|
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. -- [ Picked text/plain from multipart/alternative ] Carel, here is some code snippets to use an api for object checking (QSys file system) This is cut from RPGIVTOOLS on ISeriesNews(aka News/400) There are many other prototyped apis there if you are interested HTH Rod Orr D ApiFmtTyp S 8 Based( NulPtrTyp ) D ChrTyp S 1 Based( NulPtrTyp ) D IntTyp S 10I 0 Based( NulPtrTyp ) D LglTyp S 1N Based( NulPtrTyp ) D NamTyp S 10 Based( NulPtrTyp ) D QNamTyp S 20 Based( NulPtrTyp ) D TxtTyp S 50 Based( NulPtrTyp ) *--------------------------------------------------------------------- * Does the object exist? *--------------------------------------------------------------------- D ObjExists Pr Like( LglTyp ) D ObjNam Like( NamTyp ) Value D ObjLib Like( NamTyp ) Value * Name, *CURLIB, or *LIBL D ObjTyp Like( NamTyp ) Value *--------------------------------------------------------------------- * Get the description of an object *--------------------------------------------------------------------- D GetObjDsc Pr Like( LglTyp ) D ObjNam Like( NamTyp ) Value D ObjLib Like( NamTyp ) Value * Name, *CURLIB, or *LIBL D ObjTyp Like( NamTyp ) Value D DscFmt Like( ApiFmtTyp ) Value D ObjDsc Like( ObjDscDs ) * Description formats D BrfObjDscFmt C 'OBJD0200' D DtlObjDscFmt C 'OBJD0400' * Object description returned D ObjDscDs Ds Inz * BrfObjDscFmt D ObjDscLen Like( IntTyp ) D ObjDscSiz Like( IntTyp ) D ObjNam Like( NamTyp ) D ObjLib Like( NamTyp ) D ObjTyp Like( NamTyp ) D ObjRtnLib Like( NamTyp ) D ObjAsp Like( IntTyp ) D ObjOwnr Like( NamTyp ) D ObjDmn 2 D ObjCrtDat 7 D ObjCrtTim 6 D ObjChgDat 7 D ObjChgTim 6 D ObjAtr Like( NamTyp ) D ObjTxt Like( TxtTyp ) D ObjSrcFil Like( NamTyp ) D ObjSrcLib Like( NamTyp ) D ObjSrcMbr Like( NamTyp ) * DtlObjDscFmt D ObjSrcChgDat 7 D ObjSrcChgTim 6 D ObjSavDat 7 D ObjSavTim 6 D ObjRstDat 7 D ObjRstTim 6 D ObjCrtUsr Like( NamTyp ) D ObjCrtSys 8 D ObjResDat 7 D ObjSavSiz Like( IntTyp ) D ObjSavSeq Like( IntTyp ) D ObjStg Like( NamTyp ) D ObjSavCmd Like( NamTyp ) D ObjSavVolId 71 D ObjSavDvc Like( NamTyp ) D ObjSavFil Like( NamTyp ) D ObjSavLib Like( NamTyp ) D ObjSavLbl 17 D ObjSavLvl 9 D ObjCompiler 16 D ObjLvl 8 D ObjUsrChg Like( ChrTyp ) D ObjLicPgm 16 D ObjPtf Like( NamTyp ) D ObjApar Like( NamTyp ) D ObjUseDat 7 D ObjUsgInf Like( ChrTyp ) D ObjUseDay Like( IntTyp ) D ObjSiz Like( IntTyp ) D ObjSizMlt Like( IntTyp ) D ObjCprSts Like( ChrTyp ) D ObjAlwChg Like( ChrTyp ) D ObjChgByPgm Like( ChrTyp ) D ObjUsrAtr Like( NamTyp ) D ObjOvrflwAsp Like( ChrTyp ) D ObjSavActDat 7 D ObjSavActTim 6 D ObjAudVal Like( NamTyp ) D ObjPrmGrp Like( NamTyp ) *================================================================== P ObjExists B Export *================================================================== D Pi Like( LglTyp ) D ObjNam Like( NamTyp ) Value D ObjLib Like( NamTyp ) Value * Name, *CURLIB, or *LIBL D ObjTyp Like( NamTyp ) Value C Return GetObjDsc( ObjNam: ObjLib: C ObjTyp: BrfObjDscFmt: C ObjDscDs ) P E *===================================================================== P GetObjDsc B Export *==================================================================== D Pi Like( LglTyp ) D ObjNam Like( NamTyp ) Value D ObjLib Like( NamTyp ) Value * Name, *CURLIB, or *LIBL D ObjTyp Like( NamTyp ) Value D DscFmt Like( ApiFmtTyp ) Value D ObjDsc Like( ObjDscDs ) D QObjNam S Like( QNamTyp ) D BrfObjDscSiz C 180 D DtlObjDscSiz C %Size( ObjDscDs ) C Reset ObjDscDs C Eval QObjNam = ObjNam + ObjLib C If DscFmt = BrfObjDscFmt C Eval ObjDscSiz = BrfObjDscSiz C Else C Eval ObjDscSiz = DtlObjDscSiz C EndIf C Eval ObjDsc = ObjDscDs C Call 'QUSROBJD' C Parm ObjDsc C Parm ObjDscSiz C Parm DscFmt C Parm QObjNam C Parm ObjTyp C Parm ApiErrDs C Return ( ApiErrLen = 0 ) P E *===================================================================== _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l or email: MIDRANGE-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l. ********************************************************************** This email may be confidential and/or privileged. Only the intended recipient may access or use it. Any dissemination, distribution or copying of this email is strictly prohibited. If you are not the intended recipient please notify us immediately by return email and then erase the email. We use virus scanning software but exclude all liability for viruses or similar in any attachment or message...,..,..,. **********************************************************************
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.