MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Create output with rec counts and sizes for 10 files

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
syandra
Beginner


Joined: 26 May 2003
Posts: 19
Topics: 6

PostPosted: Thu Jun 26, 2008 1:28 pm    Post subject: Create output with rec counts and sizes for 10 files Reply with quote

Hi All,

I have a requirement to read 10 files and write a output containing the record counts and file sizes. Initially I thought of writing a cobol code. But then I realized, there should be a way with ICETOOL.

Can anyone please help me with the control cards for the above issue.

Thanks in advance
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Jun 26, 2008 1:32 pm    Post subject: Reply with quote

syandra,

Record count is easy but what exactly did you mean file size?
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
syandra
Beginner


Joined: 26 May 2003
Posts: 19
Topics: 6

PostPosted: Thu Jun 26, 2008 5:36 pm    Post subject: Reply with quote

kolusu wrote:
syandra,

Record count is easy but what exactly did you mean file size?
Kolusu,

Thanks for your response.

File size is the byte count of the file. (File Size = Record Length * Record Count)

Syandra
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Jun 26, 2008 6:22 pm    Post subject: Reply with quote

syandra,

Are the input datasets FB or VB format? Are they all of the same length? Can you post a sample output you want to see?

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
syandra
Beginner


Joined: 26 May 2003
Posts: 19
Topics: 6

PostPosted: Thu Jun 26, 2008 7:09 pm    Post subject: Reply with quote

kolusu wrote:
syandra,

Are the input datasets FB or VB format? Are they all of the same length? Can you post a sample output you want to see?

Kolusu
Kolusu,

1) All are FB files
2) Files are of different lengths

Sample Output:

FILENAME MYID.TEST.FILE1 RECORDCOUNT 0000010 FILESIZE 0000800 DATE 2008/06/26 TIME 17:09
FILENAME MYID.TEST.FILE2 RECORDCOUNT 0000010 FILESIZE 0000810 DATE 2008/06/26 TIME 17:09
FILENAME MYID.TEST.FILE3 RECORDCOUNT 0000110 FILESIZE 0009900 DATE 2008/06/26 TIME 17:09
FILENAME MYID.TEST.FILE4 RECORDCOUNT 0000010 FILESIZE 0000800 DATE 2008/06/26 TIME 17:09
FILENAME MYID.TEST.FILE5 RECORDCOUNT 0000010 FILESIZE 0000800 DATE 2008/06/26 TIME 17:09
FILENAME MYID.TEST.FILE6 RECORDCOUNT 0000010 FILESIZE 0000800 DATE 2008/06/26 TIME 17:09


Syandra
Back to top
View user's profile Send private message
syandra
Beginner


Joined: 26 May 2003
Posts: 19
Topics: 6

PostPosted: Tue Jul 01, 2008 3:03 pm    Post subject: Reply with quote

Hi Kolusu,

Is anything missing in the info I provided. Please let me know, if you need further information.

Thanks,
Syandra
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Jul 01, 2008 4:10 pm    Post subject: Reply with quote

Syandra,

Here is a DFSORT/ICETOOL JCL which will give you the desired results. The first step just gathers info about the input files and we use that info in the next step to actually generate the desired output. Make sure to put the same order of file names in both steps (in.. and SYMNames DD names)

Code:

//STEP0100 EXEC PGM=ICETOOL                             
//TOOLMSG  DD SYSOUT=*                                 
//DFSMSG   DD DSN=&&T1,DISP=(MOD,PASS),SPACE=(CYL,(2,2))
//IN01     DD DISP=SHR,DSN=Your fb input file01
//IN02     DD DISP=SHR,DSN=Your fb input file02   
//IN03     DD DISP=SHR,DSN=Your fb input file03   
//IN04     DD DISP=SHR,DSN=Your fb input file04
//IN05     DD DISP=SHR,DSN=Your fb input file05         
//IN06     DD DISP=SHR,DSN=Your fb input file06           
//IN07     DD DISP=SHR,DSN=Your fb input file07       
//IN08     DD DISP=SHR,DSN=Your fb input file08
//IN09     DD DISP=SHR,DSN=Your fb input file09   
//IN10     DD DISP=SHR,DSN=Your fb input file10   
//OUT      DD DUMMY                               
//TOOLIN   DD *                                   
  COPY FROM(IN01) TO(OUT)                         
  COPY FROM(IN02) TO(OUT)                         
  COPY FROM(IN03) TO(OUT)                         
  COPY FROM(IN04) TO(OUT)                         
  COPY FROM(IN05) TO(OUT)                         
  COPY FROM(IN06) TO(OUT)                         
  COPY FROM(IN07) TO(OUT)                         
  COPY FROM(IN08) TO(OUT)                         
  COPY FROM(IN09) TO(OUT)                         
  COPY FROM(IN10) TO(OUT)                         
/* 
//STEP0200 EXEC PGM=ICEMAN       
//SYSOUT   DD SYSOUT=*           
//SYMNAMES DD *                   
DSN01,C'YOUR FB INPUT FILE01'     
DSN02,C'YOUR FB INPUT FILE02'     
DSN03,C'YOUR FB INPUT FILE03'     
DSN04,C'YOUR FB INPUT FILE04'     
DSN05,C'YOUR FB INPUT FILE05'     
DSN06,C'YOUR FB INPUT FILE06'     
DSN07,C'YOUR FB INPUT FILE07'     
DSN08,C'YOUR FB INPUT FILE08'     
DSN09,C'YOUR FB INPUT FILE09'     
DSN10,C'YOUR FB INPUT FILE10'     
//SORTIN   DD DSN=&&T1,DISP=SHR   
//SORTOUT  DD SYSOUT=*,RECFM=FB   
//SYSIN    DD *                                                 
  INCLUDE COND=(2,7,SS,EQ,C'ICE088I,ICE054I')                   
  INREC IFTHEN=(WHEN=(2,7,CH,EQ,C'ICE088I'),                   
        PARSE=(%00=(STARTAFT=C'LRECL =',ENDBEFR=C',',FIXLEN=5)),
        BUILD=(SEQNUM,8,ZD,X,%00,UFF,EDIT=(TTTTT),X,10C'0')),   
        IFTHEN=(WHEN=(2,7,CH,EQ,C'ICE054I'),                   
        PARSE=(%01=(STARTAFT=C'IN:',ENDBEFR=C',',FIXLEN=10)),   
        BUILD=(SEQNUM,8,ZD,X,5C'0',X,%01,UFF,M11,LENGTH=10))   
  SORT FIELDS=(1,8,CH,A)                                       
  SUM FIELDS=(10,5,16,10),FORMAT=ZD                             
                                                               
  OUTREC IFOUTLEN=133,                                         
  IFTHEN=(WHEN=(1,8,ZD,EQ,1),                                   
  BUILD=(C'FILENAME ',DSN01,X,55:C'RECORD COUNT ',16,10,X,     
         C'FILESIZE ',10,5,ZD,MUL,16,10,ZD,M11,LENGTH=10,X,     
         C'DATE ',DATE1(/),X,C'TIME ',TIME)),                   
                                                               
  IFTHEN=(WHEN=(1,8,ZD,EQ,2),                                   
  BUILD=(C'FILENAME ',DSN02,X,55:C'RECORD COUNT ',16,10,X,     
         C'FILESIZE ',10,5,ZD,MUL,16,10,ZD,M11,LENGTH=10,X,     
         C'DATE ',DATE1(/),X,C'TIME ',TIME)),                   
                                                               
  IFTHEN=(WHEN=(1,8,ZD,EQ,3),                                   
  BUILD=(C'FILENAME ',DSN03,X,55:C'RECORD COUNT ',16,10,X,     
         C'FILESIZE ',10,5,ZD,MUL,16,10,ZD,M11,LENGTH=10,X,     
         C'DATE ',DATE1(/),X,C'TIME ',TIME)),                   
                                                               
  IFTHEN=(WHEN=(1,8,ZD,EQ,4),                                   
  BUILD=(C'FILENAME ',DSN04,X,55:C'RECORD COUNT ',16,10,X,     
         C'FILESIZE ',10,5,ZD,MUL,16,10,ZD,M11,LENGTH=10,X,     
         C'DATE ',DATE1(/),X,C'TIME ',TIME))                   

  ...

  IFTHEN=(WHEN=(1,8,ZD,EQ,10),                                   
  BUILD=(C'FILENAME ',DSN10,X,55:C'RECORD COUNT ',16,10,X,     
         C'FILESIZE ',10,5,ZD,MUL,16,10,ZD,M11,LENGTH=10,X,     
         C'DATE ',DATE1(/),X,C'TIME ',TIME))                   

/*


Hope this helps....

Cheers
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Jul 01, 2008 4:54 pm    Post subject: Reply with quote

Syandra,

I just realized that you can reduce your control cards in step0200. Change your sysin in step0200 to the following.

Code:

//SYSIN    DD *                                                   
  INCLUDE COND=(2,7,SS,EQ,C'ICE088I,ICE054I')                     
  INREC IFTHEN=(WHEN=(2,7,CH,EQ,C'ICE088I'),                     
        PARSE=(%00=(STARTAFT=C'LRECL =',ENDBEFR=C',',FIXLEN=5)), 
        BUILD=(SEQNUM,8,ZD,X,%00,UFF,EDIT=(TTTTT),X,10C'0')),     
        IFTHEN=(WHEN=(2,7,CH,EQ,C'ICE054I'),                     
        PARSE=(%01=(STARTAFT=C'IN:',ENDBEFR=C',',FIXLEN=10)),     
        BUILD=(SEQNUM,8,ZD,X,5C'0',X,%01,UFF,M11,LENGTH=10))     
  SORT FIELDS=(1,8,CH,A)                                         
  SUM FIELDS=(10,5,16,10),FORMAT=ZD                               
                                                                 
  OUTREC IFTHEN=(WHEN=INIT,                                       
         OVERLAY=(80:10,5,ZD,MUL,16,10,ZD,M11,LENGTH=10)),       
         IFTHEN=(WHEN=(1,8,ZD,EQ,01),OVERLAY=(30:DSN01)),         
         IFTHEN=(WHEN=(1,8,ZD,EQ,02),OVERLAY=(30:DSN02)),         
         IFTHEN=(WHEN=(1,8,ZD,EQ,03),OVERLAY=(30:DSN03)),         
         IFTHEN=(WHEN=(1,8,ZD,EQ,04),OVERLAY=(30:DSN04)),         
         IFTHEN=(WHEN=(1,8,ZD,EQ,05),OVERLAY=(30:DSN05)),         
         IFTHEN=(WHEN=(1,8,ZD,EQ,06),OVERLAY=(30:DSN06)),         
         IFTHEN=(WHEN=(1,8,ZD,EQ,07),OVERLAY=(30:DSN07)),         
         IFTHEN=(WHEN=(1,8,ZD,EQ,08),OVERLAY=(30:DSN08)),         
         IFTHEN=(WHEN=(1,8,ZD,EQ,09),OVERLAY=(30:DSN09)),         
         IFTHEN=(WHEN=(1,8,ZD,EQ,10),OVERLAY=(30:DSN10))         
                                                                 
  OUTFIL REMOVECC,NODETAIL,BUILD=(133X),                         
  SECTIONS=(1,8,                                                 
  TRAILER3=('FILENAME ',30,44,X,55:'RECORD COUNT ',16,10,X,       
  'FILESIZE ',80,10,X,'DATE ',DATE=(4MD/),X,'TIME ',TIME))       
/*                                                               

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
naveen_summary
Beginner


Joined: 12 Feb 2007
Posts: 26
Topics: 13

PostPosted: Wed Jul 09, 2008 7:09 am    Post subject: Reply with quote

Kolusu - Very nice. Thanks for all these postings
Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group