View previous topic :: View next topic
|
Author |
Message |
dkarthikreddy
New User
Joined: 14 Mar 2008 Posts: 28 Location: bangalore
|
|
|
|
Hi All,
I have a requirement like this, if the record count( excluding header and trailor) is more than 120K then want to execute a pgm, if it is less than the threshold count of 120K want to execute a different pgm.
Can you pls provide me the solution how to do that in a jcl. ( i want to count the records from a jcl and then based on the Return Code i want to execute subsequent steps)
Thanks
Karthik |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
This JCL will give you an RC=4, if the input file has < 120K records.
Code: |
//SORTIN DD DSN=your.input.file,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY,NULLOUT=RC4,
SKIPREC=120000,STOPAFT=1
/* |
Check the RC from this step in other step and execute the program you want to else execute the other program. |
|
Back to top |
|
|
dkarthikreddy
New User
Joined: 14 Mar 2008 Posts: 28 Location: bangalore
|
|
|
|
Hi,
Thanks for your valuable reply. It is working fine.
Karthik |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
glad to hear that it worked for you . . .
Have a good one |
|
Back to top |
|
|
|