IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Get value from 2nd record and PUSH it in 1st record


IBM Mainframe Forums -> JCL & VSAM
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
ashokakash

New User


Joined: 15 Nov 2006
Posts: 21
Location: Chennai

PostPosted: Wed Oct 17, 2018 11:41 am
Reply with quote

Hello all,
Suppose, I want some value from 2nd record being brought to 1st record, how could I do that? Can somebody help me in this?

Input
Code:

XXXXXXXXXXXXXXXX 12/31/18 ABCD123
                 15:15:43
YYYYYYYYYYYYYYYY 12/31/18 ABCD123
                 15:16:33
ZZZZZZZZZZZZZZZZ 12/31/18 ABCD123
                 15:17:23
AAAAAAAAAAAAAAAA 12/31/18 ABCD123
                 15:18:13


Desired output
first 4 chars of 1st record, date of first record and time stamp of 2nd record are pushed to the right of first 2 records and this process should go on for every 2 records.

Code:

XXXXXXXXXXXXXXXX 12/31/18 ABCD123 XXXX 12/31/18 15:15:43
                 15:15:43         XXXX 12/31/18 15:15:43
YYYYYYYYYYYYYYYY 12/31/18 ABCD123 YYYY 12/31/18 15:16:33
                 15:16:33         YYYY 12/31/18 15:16:33
ZZZZZZZZZZZZZZZZ 12/31/18 ABCD123 ZZZZ 12/31/18 15:17:23
                 15:17:23         ZZZZ 12/31/18 15:17:23
AAAAAAAAAAAAAAAA 12/31/18 ABCD123 AAAA 12/31/18 15:18:13
                 15:18:13         AAAA 12/31/18 15:18:13
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Oct 17, 2018 11:44 am
Reply with quote

This cannot be done with JCL. Duplicate of post in DFSort section. Locked.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 9
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
Search our Forums:

Back to Top