Vous êtes sur la page 1sur 7

*===================================================

* PROGRAM - @@SPACE * PURPOSE - dump objects (DSPOBJD) to userspace * WRITTEN * AUTHOR - jamie * * PROGRAM DESCRIPTION * * * * INPUT PARAMETERS * * * * * * INDICATOR USAGE * * * * * * *=================================================== * * Program Info * d d @PGM SDS 1 10 03 - Cancel current screen and return to previous screen 30 - SFLCLR 31 - SFLDSP 32 - SFLDSPCTL 33 - SFLEND Description ----------InLibary InType Type Size ---- ---Char 10 Char 10 How Used -------Library to search for objects Type of objects to dump This program will dump objects into a userspace

d @PARMS d @JOB d @USER d @JOB# * * Field Definitions. * d AllText d CmdString d CmdLength d Count d Format d GenLen d InLibrary d InType d ObjectLib d SpaceVal d SpaceAuth d SpaceText d SpaceRepl d SpaceAttr d UserSpaceOut * * GenHdr * d GenHdr d OffSet d NumEnt d Lstsiz * ds s s s s s s s s s s s s s s s

37 244 254 264

39 0 253 263 269 0

10 256 15 5 4 0 8 8 10 10 20 1 10 50 10 10 20

Inz('*ALL')

inz(*BLANKS) inz('*CHANGE') inz(*BLANKS) inz('*YES') inz(*BLANKS)

inz 1 9 13 4B 0 12B 0 16B 0

* Data structures * d GENDS d OffsetHdr d NbrInList d SizeEntry * * * d HeaderDs d OutFileNam d OutLibName d OutType d OutFormat d RecordLen ds 1 11 21 31 41 10 20 25 40 44B 0 ds 1 9 13 4B 0 12B 0 16B 0

* * API Error Data Structure * d ErrorDs d BytesPrv d BytesAvl d MessageId d ERR### d MessageDta * * Create userspace datastructure * d d StartPosit DS 1 4B 0 DS 1 5 9 16 17 4B 0 8B 0 15 16 116 INZ

d StartLen d SpaceLen d ReceiveLen d MessageKey d MsgDtaLen d MsgQueNbr *

5 9 13 17 21 25

8B 0 12B 0 16B 0 20B 0 24B 0 28B 0

* Date structure for retriving userspace info * d InputDs d UserSpace d SpaceName d SpaceLib d InpFileLib d InpFFilNam d InpFFilLib d InpRcdFmt * d ObjectDs d Object d Library d ObjectType d InfoStatus d ExtObjAttrib d Description * * Create a userspace * c * exsr $QUSCRTUS OBJ(*LIBL/*ALL) ds 10 10 10 1 10 50 DS 1 1 11 29 29 39 49 20 10 20 48 38 48 58

c *

eval

ObjectLib = '*LIBL

' + '*ALL'

* List all the objects to the user space * c * c c c c c * * Retrive header entry and process the user space * c c * * Retrive header entry and process the user space * c c c c c * c c * * * Do for number of fields eval eval StartPosit = OffsetHdr + 1 StartLen = %size(ObjectDS) call parm parm parm parm 'QUSRTVUS' UserSpace UserSpaceOut StartPosit StartLen GENDS eval eval StartPosit = 125 StartLen = 16 call(e) parm parm parm parm 'QUSLOBJ' Userspace UserSpaceOut Format ObjectLib InType eval Format = 'OBJL0200'

* B1 c * c c c c c * c c * c eval *Inlr = *On eval enddo StartPosit = StartPosit + SizeEntry call(e) parm parm parm parm 'QUSRTVUS' UserSpace UserSpaceOut StartPosit StartLen ObjectDs do NbrInList

*=============================================== * $QUSCRTUS - API to create user space *=============================================== c * * Create a user space named ListObjects in QTEMP. * c c c * * Create the user space * c c c c call(e) parm parm parm 4096 'QUSCRTUS' UserSpace UserSpaceOut SpaceAttr SpaceLen Eval BytesPrv = 116 $QUSCRTUS begsr

movel(p) 'LISTOBJECTS' SpaceName movel(p) 'QTEMP' SpaceLib

c c c c c * c

parm parm parm parm parm

SpaceVal SpaceAuth SpaceText SpaceRepl ErrorDs

endsr *================================================= * *Inzsr - One time run House keeping subroutine

*================================================= c * c c c * c endsr *============================================== *entry plist parm parm InLibrary InType *Inzsr begsr

Vous aimerez peut-être aussi