×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

REXX program skips an input record

REXX program skips an input record

REXX program skips an input record

(OP)
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?

RE: REXX program skips an input record

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.

RE: REXX program skips an input record

(OP)
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.

RE: REXX program skips an input record

(OP)
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close