View previous topic :: View next topic
|
Author |
Message |
rexx77
New User
Joined: 14 Apr 2008 Posts: 78 Location: Mysore
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
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 |
|
|
rexx77
New User
Joined: 14 Apr 2008 Posts: 78 Location: Mysore
|
|
|
|
Thanks Bill Woodger and Pandora-Box for your valuable suggestion. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Mind posting your solution here ?? So it would help others who are in need of similar requirement in future |
|
Back to top |
|
|
|