IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Query related to writing trailer record


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
devagarwal

New User


Joined: 24 Mar 2008
Posts: 8
Location: Bangalore

PostPosted: Thu Aug 07, 2008 12:26 pm
Reply with quote

Hi,
I have an input file with different record types like 010,020 till 070.

Position : 1
Size : 3
Type: ZD


My output file should have the input records as well as a trailer.
The trailer must be like:

1-87 pos: fileld with 9's

88-90 : Count of 010
91:93 : Count of 020
....
...
106-108: Count of 070
109-500: Spaces


can any one help me with it.

Bye,
Dev
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Fri Aug 08, 2008 2:07 am
Reply with quote

Do your input records have just the type number or do they have other data?

What is the RECFM and LRECL of your input file?

What do you want for the RECFM and LRECL of your output file?
Back to top
View user's profile Send private message
devagarwal

New User


Joined: 24 Mar 2008
Posts: 8
Location: Bangalore

PostPosted: Fri Aug 08, 2008 9:33 am
Reply with quote

Hi,
The input file has other contents also apart from the record type.
LRECL = 500, RECFM=FB

Output file:
LRECL = 500, RECFM=FB

With Regards,
Dev
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Fri Aug 08, 2008 11:22 pm
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/500)
//SORTOUT DD DSN=... output file (FB/500)
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(501:7C'000')),
    IFTHEN=(WHEN=(1,3,ZD,EQ,10),OVERLAY=(501:C'001')),
    IFTHEN=(WHEN=(1,3,ZD,EQ,20),OVERLAY=(504:C'001')),
    IFTHEN=(WHEN=(1,3,ZD,EQ,30),OVERLAY=(507:C'001')),
    IFTHEN=(WHEN=(1,3,ZD,EQ,40),OVERLAY=(510:C'001')),
    IFTHEN=(WHEN=(1,3,ZD,EQ,50),OVERLAY=(513:C'001')),
    IFTHEN=(WHEN=(1,3,ZD,EQ,60),OVERLAY=(516:C'001')),
    IFTHEN=(WHEN=(1,3,ZD,EQ,70),OVERLAY=(519:C'001'))
  OUTFIL REMOVECC,
    BUILD=(1,500),
    TRAILER1=(87C'9',
      88:TOT=(501,3,ZD,TO=ZD,LENGTH=3),
      91:TOT=(504,3,ZD,TO=ZD,LENGTH=3),
      94:TOT=(507,3,ZD,TO=ZD,LENGTH=3),
      97:TOT=(510,3,ZD,TO=ZD,LENGTH=3),
     100:TOT=(513,3,ZD,TO=ZD,LENGTH=3),
     103:TOT=(516,3,ZD,TO=ZD,LENGTH=3),
     106:TOT=(519,3,ZD,TO=ZD,LENGTH=3))
/*
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Aug 09, 2008 12:41 am
Reply with quote

frank,

that is a keeper.
little utility like that is easy and quick in REXX, but would be a pain to train someone without REXX background.
The DFSORT solutions are something that can be handed off easily.
Back to top
View user's profile Send private message
devagarwal

New User


Joined: 24 Mar 2008
Posts: 8
Location: Bangalore

PostPosted: Mon Aug 11, 2008 1:15 pm
Reply with quote

Hi Frank,
Thanks a lot for the solution.I tried it and it's working fine..

Cheers,
Dev
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts RC query -Time column CA Products 3
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
Search our Forums:

Back to Top