QDBRTVFD - Retrieve Database File Description
* List Key Fields (QDBRTVFD retrieve file desc)API Procedure
DListFileDesc pr ExtPgm('QDBRTVFD')
d OutputData 32766a Options(*Varsize)
d OutputDataLen 10i 0 Const
d CUSPFNameRet 20a
D PFRcdFmt 8a Const
d CUSPFName 20a Const
D RcdFmt 8a Const
d OverrideProc 1a Const
d System 10a Const
d FormatType 10a Const
d ErrorCode 32766a options(*varsize)
* List File Description Header DS
D FDHDS ds
D FDHBytesRet 10i 0
D FDHBytesAvail 10i 0
D FDHMaxKeyLen 5i 0
D FDHKeyCount 5i 0
D FDHReserved 10a
D FDHFormatCnt 5i 0
D KeyRecFmt 10a
D KeyReserve 2a
D Key#OfKeys 5i 0
D KeyReserv1 14a
D KeyInfoOffset 10i 0
* List Key Information DS
D KeyDS ds
D KeyIntName 10a
D KeyExtName 10a
D KeyDtaType 5i 0
D KeyFldLen 5i 0
D Key#OfDigits 5i 0
D KeyDecPos 5i 0
D KeyAttrFlg 1a
D KeyAltLen 5i 0
D KeyAltName 30a
D KeyReserv3 1a
D KeyAttrFlg1 1a
D KeyReserv4 1a
c CallP(E) ListFileDesc(OutputData:
c OutputDataLen:
c CUSPFNameRet:
c 'FILD0300':
C CUSPFName:
c RcdFmtName:
c OverrideProc:
c '*LCL':
c '*EXT':
c ErrorDS)
* If Any Errors Occur or No Key Fields Found, Set Number Of Keys To 0
c If OutputData=*Blanks
C OR %Error
c OR %len(%Trim(OutputData))=0
c Eval Key#OfKeys=0
c Else
c MoveL OutputData FDHDS
c EndIf
* Process Key Information Stored in the OutputData Variable
c Eval StrPos=KeyInfoOffset+1
c Do Key#OfKeys
c Eval KeyDS=%Subst(OutputData:StrPos:
c +%Size(KeyDS))
阅读(793) | 评论(0) | 转发(0) |