Kevleemor
580 pts. | Nov 26 2008 3:16PM GMT
I looked at the Job Definition Attributes of the submitted job, it is set to *RQD.
Job: RECORDLOCK User: KLM Number: 246458 Default output queue . . . . . . . . . . . . . . : QPRINT Library . . . . . . . . . . . . . . . . . . . . : QGPL Job date . . . . . . . . . . . . . . . . . . . . : Date format . . . . . . . . . . . . . . . . . . . : *MDY Date separator . . . . . . . . . . . . . . . . . : / Time separator . . . . . . . . . . . . . . . . . : : Time zone . . . . . . . . . . . . . . . . . . . . : QN0500EST3 Decimal format . . . . . . . . . . . . . . . . . : *BLANK Job switches . . . . . . . . . . . . . . . . . . : Inquiry message reply . . . . . . . . . . . . . . : *RQD
Gilly400
23625 pts. | Nov 26 2008 4:53PM GMT
Hi Kevin,
The job is set to *RQD and it still auto replies to the locked record messages in the joblog? Which column is your indicator 99 in for your CHAIN opcode?
Regards,
Martin Gilbert.
Kevleemor
580 pts. | Nov 26 2008 9:46PM GMT
Hi Gil, it is in the HI position to check if the record is not found.
Kevin
Sloopy
1930 pts. | Nov 28 2008 10:12AM GMT
I tested your code on my system, using the following two programs (file changed to suit our database) :
TSTLCK1 program….
FCUSTL1 UF E K DISK infds(SRWNAM) D SRWNAM DS D Status *Status D Response S 1 Inz(’A') C K_CS KLIST C KFLD CSSTAT C KFLD CSCUST C EVAL CSSTAT = 0 C EVAL CSCUST = ‘GBSIMON1′ C DOU Status <> 1218 C* Read the Customer Master Record C K_CS CHAIN(E) CS 99 C* Check the File Status, if record was locked, execute subroutine C IF %Status(CUSTL1) = 1218 C Status DSPLY ‘BLECMD’ Response C ENDIF C ENDDO C EVAL *INLR = *ON
TSTLCK2 program….
FCUSTL1 UF E K DISK infds(SRWNAM) D SRWNAM DS D Status *Status D Response S 1 Inz(’A') C K_CS KLIST C KFLD CSSTAT C KFLD CSCUST C EVAL CSSTAT = 0 C EVAL CSCUST = ‘GBSIMON1′ C* Read the Customer Master Record C K_CS CHAIN(E) CS 99 C Status DSPLY Response C EVAL *INLR = *ON
Running TSTLCK2 interactively holds the record lock until a reply is entered.
Sending TSTLCK1 to run in batch results in a wait on the locked record (1 minute), then the DSPLY operation sends its message to my message queue requiring a response.
In the batch job, Inquiry Message Reply is *RQD.
So; I can’t see any reason why your code should not work in batch. Try using the DSPLY or DUMP operations to see the contents of the STATUS variable; and make sure that there really IS a lock on the record you expect.
Regards,
Sloopy






