View previous topic :: View next topic
|
Author |
Message |
kalpeshgala
New User
Joined: 08 Jul 2005 Posts: 4
|
|
|
|
Hi,
Is there anyway in JCL by which :-
in step 1) I can count number of records in the file (not just whether file is empty or not but actual count of records)
and in step 2) pass that count to program through parm in next step.
thanks. |
|
Back to top |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
Hi Kalpesh,
Quote: |
1) I can count number of records in the file (not just whether file is empty or not but actual count of records)
and in step |
Yes you can count the number of records in File.Try this JCL
Code: |
//SORTTST JOB (ACCT#),'SORT ',NOTIFY=&SYSUID,CLASS=T,MSGCLASS=X
//STEP01 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=Input file name,DISP=SHR
//SORTOUT DD DSN=outputfile.name,DISP=SHR
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,NODETAIL,
TRAILER1=(COUNT=(M10,LENGTH=02))
/*
//SYSUDUMP DD SYSOUT=* |
Regards
Rupesh |
|
Back to top |
|
|
radhakrishnan82
Active User
Joined: 31 Mar 2005 Posts: 435 Location: chennai, India
|
|
|
|
Try this:
Code: |
//*
//COUNT EXEC PGM=ICETOOL
//*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//*
//COUNT DD DSN=dataset name,
// DISP=SHR
//*
//TOOLIN DD DATA
COUNT FROM(COUNT)
/*
//* |
hope this helps. |
|
Back to top |
|
|
|