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
 

 

Query related to writing trailer record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Query related to writing trailer record
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 Moderator


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

PostPosted: Fri Aug 08, 2008 2:07 am    Post subject:
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    Post subject: Reply to: Query related to writing trailer record
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 Moderator


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

PostPosted: Fri Aug 08, 2008 11:22 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/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: 6967
Location: porcelain throne

PostPosted: Sat Aug 09, 2008 12:41 am    Post subject:
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    Post subject: Reply to: Query related to writing trailer record
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    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 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 Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am
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