Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us