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

SORT help - Copy a field from one line to another line


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
abby.qiong.zhang

New User


Joined: 07 Jun 2012
Posts: 26
Location: China

PostPosted: Wed May 07, 2014 12:37 pm
Reply with quote

If sort can help do this, copy value from one line and put it into another line?

I would like to copy value in col 287-288 from line D and put it at the end of line C, line D is always follow with line C, and there are many kind of other records as well which need to keep the same.

Let me give an example:
Input looks like this
Code:

Column1......................col 287-288......col512
Ctestdata..............................................
D.................................CH...........................
................
................   

Here's my output
Code:

column1................................................col512col513-514
Ctestdata........................................................CH
D....................................................................
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed May 07, 2014 1:21 pm
Reply with quote

You've already had tasks recently which you should be able to apply to do this.

Think about how you'd do it in COBOL. Then think about what you don't have in SORT, and what you have to do instead. You've already had it, but "going in the other direction". This is the same. You need to get to recognise when you know how to do something.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top