srinathangya
New User
Joined: 19 Dec 2005 Posts: 77
|
|
|
|
Hi Friends,
I have multiple files. Each file will be of different record length. And my task is to find number of records in each of these files and store it one single file. For this, I thought I could do this by SORT JCL and the output file should be File with recfm=V. And when i tried this, it didnt worked. Can anyone suggest me a solution?
Thanks
Srinath. |
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Not from what you posted. . .
"It didn't work" tells us nothing.
Post your jcl, sort control statements, and the output presented by the sort including the message-ids. Use the "Code" tag to make your post more readable as well as preserve alighment.
Use Preview to see how your post will appear to the forum and when you are satisfied with how the post appears, Submit. |
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
srinathangya,
If all your input files are FB files then you can use the following JCL to get the desired results
Code: |
//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN01 DD DISP=SHR,DSN=File 01
//IN02 DD DISP=SHR,DSN=File 02
//IN03 DD DISP=SHR,DSN=File 03
//IN04 DD DISP=SHR,DSN=File 04
//IN05 DD DISP=SHR,DSN=File 05
//IN06 DD DISP=SHR,DSN=File 06
//IN07 DD DISP=SHR,DSN=File 07
....add all your other files
/*
//OUT DD DSN=Your output file with counts,
// DISP=(MOD,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(5,1),RLSE)
/*
//TOOLIN DD *
COPY FROM(IN01) USING(CTL1)
COPY FROM(IN02) USING(CTL1)
COPY FROM(IN03) USING(CTL1)
COPY FROM(IN04) USING(CTL1)
COPY FROM(IN05) USING(CTL1)
COPY FROM(IN06) USING(CTL1)
COPY FROM(IN07) USING(CTL1)
.... add all your corresponding toolin statements
/*
//CTL1CNTL DD *
OUTREC BUILD=(SEQNUM,10,ZD,80:X)
OUTFIL FNAMES=OUT,REMOVECC,NODETAIL,
TRAILER1=('TOTAL NO: OF RECORDS : ',1,10)
/* |
|
|