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 append header with DATE before the records.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Abdul Lateef

New User


Joined: 08 Sep 2011
Posts: 5
Location: india

PostPosted: Thu Sep 08, 2011 3:21 pm    Post subject: Need to append header with DATE before the records.
Reply with quote

Hi,

I want to add header field to the file. Header file consist of text followed by DATE.
The header file should be in the format 'AAA HEADER YYYYMMDD'

My file contain records as below.

AAAAA
BBBBB
CCCCC
DDDDD

My output file should contain first byte as space and then the header and the file record should come. Below is the record which i want.


AAA HEADER YYYYMMDD
AAAAA
BBBBB
CCCCC
DDDDD

Also the output file RECFM should be fixed block (FB)
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Thu Sep 08, 2011 3:46 pm    Post subject: Reply to: Need to append header with DATE before the records
Reply with quote

Why don't you also have an indicator on the detail records to show positively that they are detail records?

Saves the embarrasment of a client called "THE HEADER COMPANY" sending your program up the creek.

While you are at it, how about a trailer record? Count of records, maybe some hash totals.

I assume that by "DATE" you mean the current business date. Where are you going to get that from?
Back to top
View user's profile Send private message
Abdul Lateef

New User


Joined: 08 Sep 2011
Posts: 5
Location: india

PostPosted: Thu Sep 08, 2011 4:04 pm    Post subject:
Reply with quote

Actually the file needs to be axiomed. so that they can download from axiom link. on top of the file they need the text with the current date.

I have a sample code but the RECFM for the output file is FBA. I want the RECFM with FB.

sort card.

Code:

//SORTIN DD   *
AAAAA
BBBBB
CCCCC
DDDDD         
//SORTOUT DD  *                                                 
//SYSIN    DD   *                               
  SORT FIELDS=COPY                           
  OUTFIL FNAMES=SORTOUT,                     
   HEADER1=(2:C'AAA HEADER ',10:&DATE),   
   BUILD=(1:C' ',2:1,5)     
/*
Back to top
View user's profile Send private message
kratos86

Active User


Joined: 17 Mar 2008
Posts: 148
Location: Anna NGR

PostPosted: Thu Sep 08, 2011 5:07 pm    Post subject:
Reply with quote

Use REMOVECC as below -
Code:
  SORT FIELDS=COPY
  OUTFIL FNAMES=SORTOUT,REMOVECC,
    HEADER1=(2:C'AAA HEADER ',10:&DATE),
    BUILD=(1:C' ',2:1,5)
Back to top
View user's profile Send private message
Abdul Lateef

New User


Joined: 08 Sep 2011
Posts: 5
Location: india

PostPosted: Thu Sep 08, 2011 6:47 pm    Post subject:
Reply with quote

The above code is working. I am getting result excactly what i want.

Thanks a lot...
icon_biggrin.gif
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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


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