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 Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Display FTP Session Count within TSO Yolanda Harvey TSO/ISPF 3 Fri Mar 10, 2017 10:31 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm


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