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
 

 

How to add header with Date(YYMMDD) in the output file ?

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

New User


Joined: 04 Jun 2007
Posts: 7
Location: Chennai

PostPosted: Thu Jul 06, 2017 11:44 pm    Post subject: How to add header with Date(YYMMDD) in the output file ?
Reply with quote

Hi All,

Good Morning. I have only detail records in an 80 char fixed length input file. I wants to write output(83 bytes) file with Header(with Date in YYMMDD format) ,Details records and Trailer with counts(Only detail records count).

Thanks in advance. I tried using Header1 and Date1, But i count not reformat date into YYMMDD format.


Input file - 80 bytes - FB.

Region#(1 to 6) Card #(7 to 24), Customer name(25 to 34) Spaces(35 to 80)

XXXXXX123456789012345678GEORGE W.T
XXXXXX987654321012345678ORGNGE TBD

Expected Output file. - 83 Bytes - FB.

HDR+ 6 spaces + 18 zeroes + Date in YYMMDD format + Spaces
BDY + Input 1st rec.
BDY + Input 1st rec.
TRL + 6 spaces + 18 nines + detail record count + Spaces

HDR 000000000000000000170707
BDYXXXXXX123456789012345678GEORGE W.T
BDYXXXXXX987654321012345678ORGNGE TBD
TRL 9999999999999999990000000002


Thanks,
Rajan M.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8120
Location: East Dubuque, Illinois, USA

PostPosted: Fri Jul 07, 2017 12:17 am    Post subject:
Reply with quote

Did you search for DATE and YYMMDD? If so, you should have found http://ibmmainframes.com/about52881.html which has exactly what you need.
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 111
Location: Maryland

PostPosted: Fri Jul 07, 2017 2:36 am    Post subject:
Reply with quote

Quote:
HDR+ 6 spaces + 18 zeroes + Date in YYMMDD format + Spaces
BDY + Input 1st rec.
BDY + Input 1st rec.
TRL + 6 spaces + 18 nines + detail record count + Spaces


Code:
 SORT FIELDS=COPY
 OUTFIL REMOVECC,
        HEADER1=(C'HDR',
                 6X,18C'0',
                 &DATE=(YMD)),
        BUILD=(C'BDY',1,80),
        TRAILER1=(C'TRL',
                  6X,18C'9',
                  COUNT=(EDIT=(TTTTTT)))
 END

I guess, that's it.
Free of charge.
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 Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 5 Wed Jul 26, 2017 7:35 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am


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