Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need to count the detail record and has update in Footer rec

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Sat Jun 09, 2007 4:40 pm    Post subject: Need to count the detail record and has update in Footer rec
Reply with quote

Hi Frank,

I/P File
--------
A1 Filename Comparision1>>>>>>>>>>>>>>>>>>>>>>>> Filename
F1 E1 C 00000015
F1 E1 R 00000011
V1 E1 R 00000011
V3 E1 R 00000011
V2 E1 R 00000011
Z1 00000000 00000000 00000000
A1 Filename Comparision2>>>>>>>>>>>>>>>>>>>>>>>> Filename
F2 E1 C 00000015
F1 E1 R 00000011
F2 E1 R 00000011
V1 E1 R 00000011
V1 E1 R 00000011
Z1 00000000 00000000 00000000
A1 Filename Comparision3>>>>>>>>>>>>>>>>>>>>>>>> Filename
F1 E1 C 00000015
V1 E1 R 00000011
Z1 00000000 00000000 00000000



In the above file,
The record starts with 'A' is the 1st position is the header record.
The record starts with 'Z' is the 1st position is the Footer record.
The record starts with 'F' and 'V' is the 1st position is the body(detail) record.

Ths set which contains 'A','F','V' and 'Z' is the one set of block.
Like that it contains more than 6 set of block.

My requirements is
1) to count the number of 'F' in 1st position and it should be updated in
4th- 11th position in Footer record('Z' type record)
2)to count the number of 'V' in 1st position and it should be updated in
13th-20th position in Footer record('Z' type record)

My output should be,

Output file
----------

A1 Filename Comparision>>>>>>>>>>>>>>>>>>>>>>>> Filename
F1 E1 C 00000015
F1 E1 R 00000011
V1 E1 R 00000011
V3 E1 R 00000011
V2 E1 R 00000011
Z1 00000002 00000003 00000000
A1 Filename Comparision>>>>>>>>>>>>>>>>>>>>>>>> Filename
F2 E1 C 00000015
F1 E1 R 00000011
F2 E1 R 00000011
V1 E1 R 00000011
V1 E1 R 00000011
Z1 00000003 00000002 00000000
A1 Filename Comparision>>>>>>>>>>>>>>>>>>>>>>>> Filename
F1 E1 C 00000015
V1 E1 R 00000011
Z1 00000001 00000001 00000000

LRECL=133,RECFM=FB
If you have any query let me know.
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Sat Jun 09, 2007 9:42 pm    Post subject:
Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/133)
//SORTOUT DD DSN=...  output file (FB/133)
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(135:SEQNUM,8,ZD)),
        IFTHEN=(WHEN=(1,1,CH,EQ,C'A'),
                OVERLAY=(135:SEQNUM,8,ZD)),
        IFTHEN=(WHEN=NONE,
                OVERLAY=(143:SEQNUM,8,ZD,
                         135:135,8,ZD,SUB,143,8,ZD,M11,LENGTH=8))
  OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(151:16C'0')),
    IFTHEN=(WHEN=(1,1,CH,EQ,C'F'),OVERLAY=(151:C'00000001')),
    IFTHEN=(WHEN=(1,1,CH,EQ,C'V'),OVERLAY=(159:C'00000001'))
  OUTFIL REMOVECC,
    OMIT=(1,1,CH,EQ,C'Z'),
    BUILD=(1,133),
    SECTIONS=(135,8,
      TRAILER3=('Z1 ',TOT=(151,8,ZD,M11,LENGTH=8),X,
         TOT=(159,8,ZD,M11,LENGTH=8),X,
         C'00000000'))
/*
Back to top
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Sun Jun 10, 2007 1:13 pm    Post subject: Re: Need to count the detail record and has update in Footer
Reply with quote

Hi frank,
Thank you...
Back to top
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Tue Jun 12, 2007 1:11 pm    Post subject:
Reply with quote

Hi frank,
I got the exact output.
Thank you very much.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us