Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

REXX program skips an input record 1

Status
Not open for further replies.

Monica C.

Programmer
Sep 19, 2022
3
US
I am running a REXX program within an Endevor processor. The REXX reads through a PDS member that contains JCL to execute a DB2 bind. The REXX reads each line of the JCL and makes modifications before queueing it. After it has read through all of the ddccards, it submits the job. The REXX is not reading a certain line of the JCL input.

These are lines 78, 79 and 80 in the input JCL.
000078 PKLIST( -
000079 DB2SUBR.BC20P007 +
000080 ) -
The REXX processes line 78 correctly. When it gets to the next line, it reads line 80 instead of 79. There is no place in the REXX loop that skips to the next record. Here are displays of the data, displaying the loop count and the input record:
77 RELEASE(COMMIT) -
B IS 77
CUR LINE IS RELEASE(COMMIT) -
78 PKLIST( -
B IS 78
CUR LINE IS PKLIST( -
79 ) -
B IS 79
CUR LINE IS ) -
80 EXPLAIN(N) -
B IS 80
CUR LINE IS EXPLAIN(N) -
Has anyone come across this before?
 
I recommend running this with Trace(?R) so that you can see the results of each read as it occurs. This may give you enough information to understand what's happening.

Aside, I'm curious that line 79 terminates with a "+" rather than a "-". It has been a long time since I dealt with EndevorMVS and can't recall why that might be necessary.

I'm not going to suggest rewriting the code, but I am curious as to why this wasn't done with File Tailoring Services to begin with. Is there not an ISPEXEC environment available?

Frank Clarke
--America's source for adverse opinions since 1943.
 
I have been running with trace, which is how I've been learning what the program does. The previous Endevor admin wrote this and I'm not strong in REXX. Line 79 of the bind JCL ends with a + in the production library as well and it works when run from that one. The REXX works with two datasets, a production DB2 bind library and an exception library. The element will be in one of the two; if it is in neither, a model JCL member stored in the exception library is used. When reading from the production library, record 79 is read correctly and gets written out to the new file, so the code works as written. When reading the exception library, it skips reading that line.
 
Someone had me add a say of the dataset it determines to use, production, exception, or model. The model JCL is being used, and that one does not have line 79. I will look at that logic and see what is happening.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top