Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

List Object Locks(QWCLOBJL) api usage in IFS

223 views
Skip to first unread message

Jim Neece

unread,
Sep 13, 2002, 3:16:11 PM9/13/02
to
I am trying to use this api to check for locks on a file in the IFS. I have
a clp that is calling an rpgle that creates a user space an the load it from
the api.When I run the program it ends normally and sends back 'CPFA0A9'
'Object not found' to my clpgm. I am sending
'/custinfo/quotes/10699/0118400.rtf' as the pathname along with error parms.
Can anyone help me?
D* COMMON STRUCTURE FOR USRSPC
D/COPY NTCCOPY/QCPYLESRC,USRSPC
D* COMMON STRUCTURE FOR ERROR CODE PARAMETER
D/COPY NTCCOPY/QCPYLESRC,QUSEC
D* GENERIC HEADER FOR USER SPACE (GENERIC HEADER)
D/COPY QSYSINC/QRPGLESRC,QUSGEN
D* LIST OBJECT LOCKS API
D/COPY QSYSINC/QRPGLESRC,QWCLOBJL
D IFSPATH S 512
D FORMAT S 8
D QUALNAME S 20
D OBJTYPE S 10
D MBRNAME S 10
D PATHNAME S 512 VARYING
D*PATHNAME S 512
D DS
D PATHNAMELNG 1 4B 0 INZ
C *ENTRY PLIST
C PARM IFSPATH
C PARM ERR 1
C PARM MSG 7
C PARM MSGDTA 100
* INITIALIZE VARIABLES
* USER SPACE NAME
C EVAL SPCNAM = 'JIMSPC'
* USER SPACE LIBRARY
C EVAL SPCLIB = 'NORT7'
* USER SPACE ATTRIBUTES
C EVAL SPCATR = *BLANKS
* USER SPACE LENGTH
C EVAL SPCSIZ = 512
* USER SPACE INITIAL VALUE
C*******************EVAL SPCVAL = X'00'
C EVAL SPCVAL = *BLANKS
* USER SPACE INITIAL VALUE
C EVAL SPCAUT = '*ALL'
* USER SPACE TEXT
C EVAL SPCTXT = 'JIM USER SPACE'
* USER SPACE REPLACE
C EVAL SPCRPL = '*YES'
* CREATE USER SPACE
C CALL 'QUSCRTUS'
C PARM SPCUSR
C PARM SPCATR
C PARM SPCSIZ
C PARM SPCVAL
C PARM SPCAUT
C PARM SPCTXT
C PARM SPCRPL
C PARM QUSEC
* IF ERROR
C IF QUSBAVL > *ZEROS
C EXSR @ERRRTN
C ENDIF
C EVAL PATHNAME = %TRIM(IFSPATH)
C*******************EVAL PATHNAME = IFSPATH
C EVAL PATHNAMELNG = %LEN(PATHNAME)
* LIST OBJECT LOCKS
C CALL 'QWCLOBJL'
C PARM SPCUSR
C PARM 'OBJL0100' FORMAT
C PARM '*OBJPATH' QUALNAME
C PARM *BLANKS OBJTYPE
C PARM '*NONE ' MBRNAME
C PARM QUSEC
C PARM PATHNAME
C PARM PATHNAMELNG
* IF ERROR
C IF QUSBAVL > *ZEROS
C EXSR @ERRRTN
C ENDIF
C EVAL *INLR = *ON
C***********************************************************
C* @ERRRTN - ERROR ROUTINE
C***********************************************************
C @ERRRTN BEGSR
C EVAL ERR = 'Y'
C EVAL MSG = QUSEI
C EVAL MSGDTA = QUSED01
C EVAL *INLR = *ON
C RETURN
C ENDSR


Jim Barnes

unread,
Sep 15, 2002, 5:05:21 PM9/15/02
to
Difficult to determine without more information, but are you sure this API
can handing VARYING strings? I see you have commented out a fixed field
with the same name. But given a VARYING string contain the length in the
first two bytes, wouldn't that be a part of the path as known by the API?

"Jim Neece" <jne...@nationalticket.com> wrote in message
news:%Pqg9.3085$Lo4.1...@nnrp1.ptd.net...

bo...@slfcu.org

unread,
Sep 20, 2002, 11:48:08 AM9/20/02
to
I had the same problem as you. It was the "VARYING" length on the
"PATHNAME" field. When I changed it to a fixed length, the "Object
not found" error went away. Hope this helps.
Bob
0 new messages