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
 

 

Merge the n number of records into one record

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

New User


Joined: 22 May 2008
Posts: 27
Location: Bangaluru

PostPosted: Fri Oct 25, 2013 6:55 pm    Post subject: Merge the n number of records into one record
Reply with quote

Hi,

I have an input as below (length=80bytes)

AAAA 20140101 20140131
AAAA 20140201 20140228
AAAA 20140301 20140330

Required output is (length=80bytes)

AAAA 20140101 20140330

I need to get the date1 from first record and date2 from 2nd record.

Is it can be done using ICETOOL? The number of records can be varying.
Please help

Thanks
Back to top
View user's profile Send private message

Pandora-Box

Moderator


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

PostPosted: Fri Oct 25, 2013 7:14 pm    Post subject:
Reply with quote

Quote:
I need to get the date1 from first record and date2 from 2nd record.


Are you sure I see the date2 taken from third record

Quote:
The number of records can be varying.

1.How many records do you expect on a high volume flow day?
2.If the records are varying still should the data taken from 1st and 2nd record ( It is first and third here in output is that typo)
Back to top
View user's profile Send private message
gileshpg

New User


Joined: 22 May 2008
Posts: 27
Location: Bangaluru

PostPosted: Fri Oct 25, 2013 7:16 pm    Post subject:
Reply with quote

correction!

I need to get the date1 from first record and date2 from last record.
It can have n number of records.

sorry for the confusion.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


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

PostPosted: Fri Oct 25, 2013 8:02 pm    Post subject:
Reply with quote

Is it always from first two records?
Back to top
View user's profile Send private message
gileshpg

New User


Joined: 22 May 2008
Posts: 27
Location: Bangaluru

PostPosted: Sun Oct 27, 2013 2:04 am    Post subject: Reply to: Merge the n number of records into one record
Reply with quote

no, there it can have n number of records
I need to take the date1 from first record and date2 from last record
Last record can be n'th record
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7306

PostPosted: Sun Oct 27, 2013 4:52 am    Post subject: Reply to: Merge the n number of records into one record
Reply with quote

Have a look at this one to see if you can adapt it to your requirement.

Or you can look at ICETOOL's SELECT with LAST, You'll need a USING file. You might be able to work on this one.
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 Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts what is meaning of the number in dcl Martylin PL/I & Assembler 2 Thu Mar 09, 2017 7:18 am
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am


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