Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Adding a Date before all the records in the first column

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

New User


Joined: 14 Apr 2008
Posts: 78
Location: Mysore

PostPosted: Tue Sep 24, 2013 10:44 am    Post subject: Adding a Date before all the records in the first column
Reply with quote

Hi All,

Greetings!!!

I have a requirement like below.

Input file records:
Code:


            Date:24-Sep-2013
            
Account   Currency   Total amount   Balance amount   
12345       USD           $1,000                $100    
12346       EUR           $2,000                $200    
22222       GBP           $3,000                $300    



Expected result:
Code:

2013-09-24|12345|USD|100
2013-09-24|12346|EUR|200
2013-09-24|22222|GBP|300


I am able to extract Account, Currency, Balance amount and all. But the date column appears at only one place and i want the column to be repeated in all the records in SORTOUT.

Is there any way to populate the date field from the header across all the records?

Thanks a lot for your time in this.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7312

PostPosted: Tue Sep 24, 2013 11:37 am    Post subject: Reply to: Adding a Date before all the records in the first
Reply with quote

Yes.

Use IFTHEN=(WHEN=GROUP to identify the heading date and PUSH the date value onto each record.

You'll need to not exclude the header early, but remember to exclude it in OUTFIL processing.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1568
Location: Andromeda Galaxy

PostPosted: Tue Sep 24, 2013 11:39 am    Post subject:
Reply with quote

1.Use Symnames to produce date ( Examples already there)
2.Skip/Omit the header records
3.Parse the detail records and have fixed length ( Examples already there)
4.Reformat and write to output ( Examples already there)
Back to top
View user's profile Send private message
rexx77

New User


Joined: 14 Apr 2008
Posts: 78
Location: Mysore

PostPosted: Tue Sep 24, 2013 2:38 pm    Post subject:
Reply with quote

Thanks Bill Woodger and Pandora-Box for your valuable suggestion.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1568
Location: Andromeda Galaxy

PostPosted: Tue Sep 24, 2013 2:49 pm    Post subject:
Reply with quote

Mind posting your solution here ?? So it would help others who are in need of similar requirement in future
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 Adding FIND to ISPF Panel display of ... Harold Barnes TSO/ISPF 3 Mon Oct 07, 2019 5:46 pm
No new posts DFSMShsm Dataset Recovery with B and ... Joerg.Findeisen JCL & VSAM 0 Sat Oct 05, 2019 10:01 pm
No new posts Mainframe datasets without any last r... rajatbagga All Other Mainframe Topics 1 Tue Sep 24, 2019 8:47 am
No new posts Duplicating records in a PDS memebr/I... imcoolleo COBOL Programming 5 Mon Sep 16, 2019 3:32 pm
No new posts Compare duplicate records in same file pshongal DFSORT/ICETOOL 3 Fri Aug 09, 2019 9:37 am

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