Skip to content

Instantly share code, notes, and snippets.

@ibmiiste
Created August 14, 2015 15:36
Show Gist options
  • Save ibmiiste/065aea6affb41403126f to your computer and use it in GitHub Desktop.
Save ibmiiste/065aea6affb41403126f to your computer and use it in GitHub Desktop.
* NAME API_OBJ
* TYPE *NONE
* SRCF QRPGLESRC
* TEXT API - Gestion des objets
* -------------------------------------------------------------------------
* API de gestion des objets
* Change Library List (QLICHGLL) API
* Change Object Description (QLICOBJD)
* List Objects (QUSLOBJ) API
* Rename Object (QLIRNMO) API
* Retrieve Object Description (QUSROBJD)
* -------------------------------------------------------------------------
* Retrieve Object Description (QUSROBJD) API
DRtvObj PR EXTPGM('QUSROBJD')
D Receiver 1000A OPTIONS(*VARSIZE) Receiver variable
D RcvLen 10I 0 CONST Length of receiver
D FmtName 8A CONST Format name
D ObjName 20A CONST Object and library
D ObjType 10A CONST Object type
* Optional 1
D ErrorCode 1300A OPTIONS(*VARSIZE:*NOPASS) Error Code
* Optional 2
D* Auxiliary storage pool (ASP) control INPUT char(*)
*
* OBJD0100 Format
DOBJD0100 DS QUALIFIED
D RtnSize 10I 0 Bytes returned
D AvlSize 10I 0 Bytes available
D Name 10A Object name
D Lib 10A Object library name
D Type 10A Object type
D RtnLib 10A Return library
D ASPNbr 10I 0 Object ASP number
D Owner 10A Object owner
D Dommain 2A Object domain
D CrtDte 13A Creation date and t
D ChgDte 13A Object change date
DOBJD0200 DS QUALIFIED
D RtnSize 10I 0 Bytes returned
D AvlSize 10I 0 Bytes available
D Name 10A Object name
D Lib 10A Object library name
D Type 10A Object type
D RtnLib 10A Return library
D ASPNbr 10I 0 Object ASP number
D Owner 10A Object owner
D Dommain 2A Object domain
D CrtDte 13A Creation date and t
D ChgDte 13A Object change date
d Atr 10A Extended object att
d Txt 50A Text description
d SrcF 10A Source file name
d SRCL 10A Source file library
d SRCM 10A Source file member
DOBJD0300 DS QUALIFIED
D RtnSize 10I 0 Bytes returned
D AvlSize 10I 0 Bytes available
D Name 10A Object name
D Lib 10A Object library name
D Type 10A Object type
D RtnLib 10A Return library
D ASPNbr 10I 0 Object ASP number
D Owner 10A Object owner
D Dommain 2A Object domain
D CrtDte 13A Creation date and t
D ChgDte 13A Object change date
d Atr 10A Extended object att
d Txt 50A Text description
d SrcF 10A Source file name
d SRCL 10A Source file library
d SRCM 10A Source file member
d SrcUpd 13A Source file updated
d SveDte 13A Object saved date a
d RstDte 13A Object restored dat
d CrtUsr 10A Creator's user prof
d 8A System where object
d RzDte 7A Reset date
d SavSz 10I 0 Save size
d SavSeq 10I 0 Save sequence numbe
d SavSto 10A Storage
d SavCmd 10A Save command
d SavVid 71A Save volume ID
d SavDev 10A Save device
d SavFnm 10A Save file name
d SavFLb 10A Save file library n
d SavLbl 17A Save label
d SysLvl 9A System level
d Compiler 16A Compiler
d ObjLvl 8A Object level
d UsrChgd 1A User changed
d LicPgm 16A Licensed program
d Ptf 10A Program temporary f
d AApar 10A Authorized program
* OBJD0400 -----------
DOBJD0400 DS QUALIFIED
D RtnSize 10I 0 Bytes returned
D AvlSize 10I 0 Bytes available
D Name 10A Object name
D Lib 10A Object library name
D Type 10A Object type
D RtnLib 10A Return library
D ASPNbr 10I 0 Object ASP number
D Owner 10A Object owner
D Dommain 2A Object domain
D CrtDte 13A Creation date and t
D ChgDte 13A Object change date
d Atr 10A Extended object att
d Txt 50A Text description
d SrcF 10A Source file name
d SRCL 10A Source file library
d SRCM 10A Source file member
d SrcUpd 13A Source file updated
d SveDte 13A Object saved date a
d RstDte 13A Object restored dat
d CrtUsr 10A Creator's user prof
d 8A System where object
d RzDte 7A Reset date
d SavSz 10I 0 Save size
d SavSeq 10I 0 Save sequence numbe
d SavSto 10A Storage
d SavCmd 10A Save command
d SavVid 71A Save volume ID
d SavDev 10A Save device
d SavFnm 10A Save file name
d SavFLb 10A Save file library n
d SavLbl 17A Save label
d SysLvl 9A System level
d Compiler 16A Compiler
d ObjLvl 8A Object level
d UsrChgd 1A User changed
d LicPgm 16A Licensed program
d Ptf 10A Program temporary f
d AApar 10A Authorized program
d UseDte 7A Last-used date
d UseInfUpd 1A Usage information u
d DayCnt 10I 0 Days-used count
d ObjSz 10I 0 Object size
d OBjMul 10I 0 Object size multipl
d Compress 1A Object compression
d PgmChgAlw 1A Allow change by pro
d ChdPgm 1A Changed by program
d UsrAtt 10A User-defined attrib
d OflAsp 1A Object overflowed A
d ActSavDte 13A Save active date an
d AudVlu 10A Object auditing val
d PriGrp 10A Primary group
d JrnSts 1A Journal status
d JrnNm 10A Journal name
d JrnLib 10A Journal library nam
d JrnImg 1A Journal images
d JrnOmit 1A Journal entries to
d JrnStrDte 13A Journal start date
d DgtSig 1A Digitally signed
d SavUntSiz 10I 0 Saved size in units
d SavUntMul 10I 0 Saved size multipli
d AspLibNbr 10I 0 Library ASP number
d AspDevNm 10A Object ASP device n
d AspLibNm 10A Library ASP device
d DgtTrust 1A Digitally signed by
d DgtMost 1A Digitally signed mo
* ------------------------------------------------------------------------
* QUSLOBJ Liste d'objets
* ------------------------------------------------------------------------
DQUSLOBJ PR EXTPGM('QUSLOBJ')
D Qusname 20A CONST Qualified user spac
D Format 8A CONST Format name
D QObjectName 20A CONST Object and library
D ObjectType 10A CONST Object type
* Optional Parameter Group 1:
D ErrorCode 1200A OPTIONS(*NOPASS:*VARSIZE) Error Code
* Optional Parameter Group 2:
D AutControl 1200A OPTIONS(*NOPASS:*VARSIZE) Authority control
D SelectControl 1200A OPTIONS(*NOPASS:*VARSIZE) Selection control
* Optional Parameter Group 3:
D AspControl 1200A OPTIONS(*NOPASS:*VARSIZE) Auxiliary storage p
* DS Liste d'objets
* Input Parameter
DOBJLINPUT DS QUALIFIED
D IOLUsNm 10A User space name
D IOLUsLb 10A User space library
D IOLFmNm 8A Format name
D IOLObNs 10A Object name specifi
D IOLObLs 10A Object library name
D IOLObTs 10A Object type specifi
D 2A Reserved
D IOLErrCode 10I 0 Error code bytes pr
D IOLAuCtLen 10I 0 Length of authority
D IOLCallLevel 10I 0 Call level
D IOLOfObAu 10I 0 Displacement to obj
D IOLNbObAu 10I 0 Number of object au
D IOLOfLbAu 10I 0 Displacement to lib
D IOLNbLbAu 10I 0 Number of library a
D IOLLnSlCf 10I 0 Length of selection
D IOLSlOmSt 10I 0 Select or omit stat
D IOLOfSts 10I 0 Displacement to sta
D IOLNbSts 10I 0 Number of statuses
D IOLLnAsp 10I 0 Length of ASP contr
D IOLAspDevN 10A Auxiliary storage p
D IOLAspSchT 10A Auxiliary storage p
D IOLDatas 32000A Object authorities
* Objct list data
DOBJL0100 DS QUALIFIED
D OblName 10A Object name used
D ObLLib 10A Object library name
D OblTyp 10A Object type used
* OBJL0200 Information de création
DOBJL0200 DS QUALIFIED
D OblName 10A Object name used
D ObLLib 10A Object library name
D OblTyp 10A Object type used
D OblInfSts 1A Information status
D ObLXAt 10A Extended object att
D OblTxt 50A Text description
D ObLUat 10A User-defined attrib
D 7A Reserved
* OBJL0300 List data section
DOBJL0300 DS QUALIFIED
D OblName 10A Object name used
D ObLLib 10A Object library name
D OblTyp 10A Object type used
D OblInfSts 1A Information status
D ObLXAt 10A Extended object att
D OblTxt 50A Text description
D ObLUat 10A User-defined attrib
D 7A Reserved
D OblAspNb 10I 0 Object auxiliary st
D OblObOwn 10A Object owner
D ObLObDom 2A Object domain
D OblObCrt 8A Creation date and t
D OblObChg 8A Change date and tim
D ObLStorage 10A Storage
D OblZipSts 1A Object compression
D OblAllChg 1A Allow change by pro
D ObLPgmChg 1A Changed by program
D OblObAudi 1A Object auditing val
D OblSig 1A Digitally signed
D OblSigSys 1A Digitally signed by
D ObLSigOnc 1A Digitally signed mo
D 2A Reserved
D OblAspNbr 10I 0 Library auxiliary s
* OBJL0400 Source informations
DOBJL0400 DS QUALIFIED
D OblName 10A Object name used
D ObLLib 10A Object library name
D OblTyp 10A Object type used
D OblInfSts 1A Information status
D ObLXAt 10A Extended object att
D OblTxt 50A Text description
D ObLUat 10A User-defined attrib
D 7A Reserved
D OblAspNb 10I 0 Object auxiliary st
D OblObOwn 10A Object owner
D ObLObDom 2A Object domain
D OblObCrt 8A Creation date and t
D OblObChg 8A Change date and tim
D ObLStorage 10A Storage
D OblZipSts 1A Object compression
D OblAllChg 1A Allow change by pro
D ObLPgmChg 1A Changed by program
D OblObAudi 1A Object auditing val
D OblSig 1A Digitally signed
D OblSigSys 1A Digitally signed by
D ObLSigOnc 1A Digitally signed mo
D 2A Reserved
D OblAspNbr 10I 0 Library auxiliary s
D OblSrcF 10A Source file name
D OblSrcL 10A Source file library
D OblSrcM 10A Source file member
D OblSrcUpd 13A Source file updated
D OblUsrCrt 10A Creator's user prof
D OblSysCrt 8A System where object
D OblSysLvl 9A System level
D OblCompiler 16A Compiler
D OblObLevel 8A Object level
D OblUserChg 1A User changed
D OblLicPgm 16A Licensed program
D OblPTF 10A Program temporary f
D OblAlwAPAR 10A Authorized program
D OblPrmGrp 10A Primary group
D OblAssSpcSz 4A Associated space si
D OblSpAlign 1A Optimum space align
D 6A Reserved
* OBJL0500 Saves & journalization informations
DOBJL0500 DS QUALIFIED
D OblName 10A Object name used
D ObLLib 10A Object library name
D OblTyp 10A Object type used
D OblInfSts 1A Information status
D ObLXAt 10A Extended object att
D OblTxt 50A Text description
D ObLUat 10A User-defined attrib
D 7A Reserved
D OblAspNb 10I 0 Object auxiliary st
D OblObOwn 10A Object owner
D ObLObDom 2A Object domain
D OblObCrt 8A Creation date and t
D OblObChg 8A Change date and tim
D ObLStorage 10A Storage
D OblZipSts 1A Object compression
D OblAllChg 1A Allow change by pro
D ObLPgmChg 1A Changed by program
D OblObAudi 1A Object auditing val
D OblSig 1A Digitally signed
D OblSigSys 1A Digitally signed by
D ObLSigOnc 1A Digitally signed mo
D 2A Reserved
D OblAspNbr 10I 0 Library auxiliary s
D OblSrcF 10A Source file name
D OblSrcL 10A Source file library
D OblSrcM 10A Source file member
D OblSrcUpd 13A Source file updated
D OblUsrCrt 10A Creator's user prof
D OblSysCrt 8A System where object
D OblSysLvl 9A System level
D OblCompiler 16A Compiler
D OblObLevel 8A Object level
D OblUserChg 1A User changed
D OblLicPgm 16A Licensed program
D OblPTF 10A Program temporary f
D OblAlwAPAR 10A Authorized program
D OblPrmGrp 10A Primary group
D OblAssSpcSz 4A Associated space si
D OblSpAlign 1A Optimum space align
D 6A Reserved
D OblSavDte 8A Object saved date a
D OblRstDte 8A Object restored dat
D OblSavSz 10I 0 Save size
D OblSavSzM 10I 0 Save size multiplie
D OblSavSeq 10I 0 Save sequence numbe
D OblSavCmd 10A Save command
D OblSavVolId 71A Save volume ID
D OblSavDevice 10A Save device
D OblSavFName 10A Save file name
D OblSavLName 10A Save file library n
D OblSavLbl 17A Save label
D OblSavActDte 8A Save active date an
D OblJrnSts 1A Journal status
D OblJrnName 10A Journal name
D OblJrnLib 10A Journal library nam
D OblJrnImg 1A Journal images
D OblJrnOmit 1A Journal entries to
D OblJrnStrDte 8A Journal start date
D 13A Reserved
* OBJL0600 Usage information
DOBJL0600 DS QUALIFIED
D OblName 10A Object name used
D ObLLib 10A Object library name
D OblTyp 10A Object type used
D OblInfSts 1A Information status
D ObLXAt 10A Extended object att
D OblTxt 50A Text description
D ObLUat 10A User-defined attrib
D 7A Reserved
D OblAspNb 10I 0 Object auxiliary st
D OblObOwn 10A Object owner
D ObLObDom 2A Object domain
D OblObCrt 8A Creation date and t
D OblObChg 8A Change date and tim
D ObLStorage 10A Storage
D OblZipSts 1A Object compression
D OblAllChg 1A Allow change by pro
D ObLPgmChg 1A Changed by program
D OblObAudi 1A Object auditing val
D OblSig 1A Digitally signed
D OblSigSys 1A Digitally signed by
D ObLSigOnc 1A Digitally signed mo
D 2A Reserved
D OblAspNbr 10I 0 Library auxiliary s
D OblSrcF 10A Source file name
D OblSrcL 10A Source file library
D OblSrcM 10A Source file member
D OblSrcUpd 13A Source file updated
D OblUsrCrt 10A Creator's user prof
D OblSysCrt 8A System where object
D OblSysLvl 9A System level
D OblCompiler 16A Compiler
D OblObLevel 8A Object level
D OblUserChg 1A User changed
D OblLicPgm 16A Licensed program
D OblPTF 10A Program temporary f
D OblAlwAPAR 10A Authorized program
D OblPrmGrp 10A Primary group
D OblAssSpcSz 4A Associated space si
D OblSpAlign 1A Optimum space align
D 6A Reserved
D OblSavDte 8A Object saved date a
D OblRstDte 8A Object restored dat
D OblSavSz 10I 0 Save size
D OblSavSzM 10I 0 Save size multiplie
D OblSavSeq 10I 0 Save sequence numbe
D OblSavCmd 10A Save command
D OblSavVolId 71A Save volume ID
D OblSavDevice 10A Save device
D OblSavFName 10A Save file name
D OblSavLName 10A Save file library n
D OblSavLbl 17A Save label
D OblSavActDte 8A Save active date an
D OblJrnSts 1A Journal status
D OblJrnName 10A Journal name
D OblJrnLib 10A Journal library nam
D OblJrnImg 1A Journal images
D OblJrnOmit 1A Journal entries to
D OblJrnStrDte 8A Journal start date
D 13A Reserved
D OblLastUsed 8A Last-used date and
D OblRestDte 8A Reset date and time
D OblDayUsgCnt 10I 0 Days-used count
D OblUpdUsgInf 1A Usage information u
D OblObjAspDevN 10A Object ASP device n
D OblObjAspDevL 10A Library ASP device
D 3A Reserved
* OBJL0700 Size information
DOBJL0700 DS QUALIFIED
D OblName 10A Object name used
D ObLLib 10A Object library name
D OblTyp 10A Object type used
D OblInfSts 1A Information status
D ObLXAt 10A Extended object att
D OblTxt 50A Text description
D ObLUat 10A User-defined attrib
D 7A Reserved
D OblAspNb 10I 0 Object auxiliary st
D OblObOwn 10A Object owner
D ObLObDom 2A Object domain
D OblObCrt 8A Creation date and t
D OblObChg 8A Change date and tim
D ObLStorage 10A Storage
D OblZipSts 1A Object compression
D OblAllChg 1A Allow change by pro
D ObLPgmChg 1A Changed by program
D OblObAudi 1A Object auditing val
D OblSig 1A Digitally signed
D OblSigSys 1A Digitally signed by
D ObLSigOnc 1A Digitally signed mo
D 2A Reserved
D OblAspNbr 10I 0 Library auxiliary s
D OblSrcF 10A Source file name
D OblSrcL 10A Source file library
D OblSrcM 10A Source file member
D OblSrcUpd 13A Source file updated
D OblUsrCrt 10A Creator's user prof
D OblSysCrt 8A System where object
D OblSysLvl 9A System level
D OblCompiler 16A Compiler
D OblObLevel 8A Object level
D OblUserChg 1A User changed
D OblLicPgm 16A Licensed program
D OblPTF 10A Program temporary f
D OblAlwAPAR 10A Authorized program
D OblPrmGrp 10A Primary group
D OblAssSpcSz 4A Associated space si
D OblSpAlign 1A Optimum space align
D 6A Reserved
D OblSavDte 8A Object saved date a
D OblRstDte 8A Object restored dat
D OblSavSz 10I 0 Save size
D OblSavSzM 10I 0 Save size multiplie
D OblSavSeq 10I 0 Save sequence numbe
D OblSavCmd 10A Save command
D OblSavVolId 71A Save volume ID
D OblSavDevice 10A Save device
D OblSavFName 10A Save file name
D OblSavLName 10A Save file library n
D OblSavLbl 17A Save label
D OblSavActDte 8A Save active date an
D OblJrnSts 1A Journal status
D OblJrnName 10A Journal name
D OblJrnLib 10A Journal library nam
D OblJrnImg 1A Journal images
D OblJrnOmit 1A Journal entries to
D OblJrnStrDte 8A Journal start date
D 13A Reserved
D OblLastUsed 8A Last-used date and
D OblRestDte 8A Reset date and time
D OblDayUsgCnt 10I 0 Days-used count
D OblUpdUsgInf 1A Usage information u
D OblObjAspDevN 10A Object ASP device n
D OblObjAspDevL 10A Library ASP device
D 3A Reserved
D OblSize 10I 0 Object size
D OblSizeM 10I 0 Object size multipl
D OblASPOfl 1A Object overflowed A
D 3A Reserved
* ---------------------------------------------------------
* Change Object Description (QLICOBJD) API
* ---------------------------------------------------------
DChgObjd PR EXTPGM('QLICOBJD')
D RtnLib 10A
D ObjNm 20A CONST
D ObjType 10A CONST
D ChgInfo 60A CONST OPTIONS(*VARSIZE)
D ErrorCode 32767A OPTIONS(*VARSIZE)
*
DObjChgAtr DS QUALIFIED
D CatrVarLen 1 4I 0
D catrVarDta 5 320A
DAtrToChg DS QUALIFIED
D catrKey 10I 0
D catrLen 10I 0
D catrDta 58A
* Key change object description
DCObjdScrf C 1 Source file
DCObjdScrDte C 2 Source file last cha
DCObjdCompiler C 3 Compiler
DCObjdLvlObj C 4 Object control level
DCObjdLicPgm C 5 Licensed program
DCObjdPtfNbr C 6 Program temporary fi
DCObjdApar C 7 Authorized program a
DCObjdPgmChg C 8 Allow change by prog
DCObjdUsrAtr C 9 User-defined attribu
DCObjdText C 10 Text
DCObjdDyaCount C 11 Days used count
DCObjdPrdLID C 12 Product option load
DCObjdPrdID C 13 Product option ID
DCObjdComponent C 14 Component ID
DCObjdLastUsed C 15 Last used date
DCObjdChgDte C 16 Changed date and tim
DCObjdDayCount C 17 Member's days used c
* ---------------------------------------------------------
* Rename Object (QLIRNMO) API
* ---------------------------------------------------------
DRnmObj PR EXTPGM('QLIRNMO')
D FromObj 20A CONST
D Type 10A CONST
D ToObj 20A CONST
D Replace 1A CONST
D ErrorCode 32767A OPTIONS(*VARSIZE)
* ---------------------------------------------------------
* Change Library List (QLICHGLL) API
* ---------------------------------------------------------
DChgLibl PR EXTPGM('QLICHGLL')
D CurLib 11A CONST
D PrdLib1 11A CONST
D PrdLib2 11A CONST
D UsrLibl 2805A CONST
D NbrLib 10I 0 CONST
D ErrorCode 32767A OPTIONS(*VARSIZE)
* ------------------------------------------------------------------------
* Retrieve Library Description (QLIRLIBD) API
* ------------------------------------------------------------------------
DRtvLibD PR EXTPGM('QLIRLIBD')
D RtvLibDta 32765A Receiver variable
D RtvDtaLen 10I 0 CONST Length of receiver v
D RtvLdName 10A CONST Library name
D RtvLdAtr 200A CONST OPTIONS(*VARSIZE) Attributes to retrie
D ErorCode 3200A OPTIONS(*VARSIZE) Error code
* Format of Data Returned
DRTVL0010 DS QUALIFIED
D LenRtn 10I 0
D LenAvl 10I 0
D VarLRtn 10I 0
D VarLAvl 10I 0
D RtnLibDta 32765A
* Format for Variable Length Record
DRTVL0020 DS QUALIFIED
D LenRtn 10I 0
D KeyId 10I 0
D SzFld 10I 0
D FldVal 60A
* Keys
DLibDType C 1 10I0 Type of librar
DLibDASPnb C 2 10I0 Auxiliary stor
DLibDCrtAut C 3 10A Create authori
DLibDObjAud C 4 10A Create object
DLibDext C 5 50A Text descripti
DLibDSize C 6 12A Library size i
DLibDNbrObj C 7 10I Number of obje
DLibDASPNm C 8 10A Auxiliary stor
* ------------------------------------------------------------------------
* List Objects (QUSLOBJ) API
* ------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment