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
 

 

Append data from a PS file to another file using SORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
mksranjani

New User


Joined: 03 Feb 2010
Posts: 29
Location: Chennai

PostPosted: Fri Aug 17, 2012 9:04 am    Post subject: Append data from a PS file to another file using SORT
Reply with quote

Hi,

There is a PS file FILE1 with LRECL 80 bytes. It has the below data

Code:
ABCDEFG.TXT                                                   
There is another PS file FILE2 with LRECL 80 bytes. It has the below data
Code:

cd AAAAAAAAA                                                     
cd BBBBBBBB                                                     
cd CCCCCC                                                       
cd DDD                                                           
cd EEEEE                                                         
cd FFF                                                           
locsite pri=5 cy sec=1 cy u=testda rec=fb lr=1402 blocksi=0     
get                                                        +     
'USER.NONX.USER1234.SAMPLE(+1)'                                 
quit                                                             


The data from FILE1 needs to be moved after 'get' in FILE2. So the final output needs to be as below

Code:
cd AAAAAAAAA                                                     
cd BBBBBBBB                                                     
cd CCCCCC                                                       
cd DDD                                                           
cd EEEEE                                                         
cd FFF                                                           
locsite pri=5 cy sec=1 cy u=testda rec=fb lr=1402 blocksi=0     
get ABCDEFG.TXT                                            +     
'USER.NONX.USER1234.SAMPLE(+1)'                                 
quit                                                             


Please help to do this using sort or icetool
Back to top
View user's profile Send private message

Pandora-Box

Moderator


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

PostPosted: Fri Aug 17, 2012 10:03 am    Post subject:
Reply with quote

So you never said your requirement clearly and did a duplicate post?

IF your version of SYNCSORT does support SYMNAMES create a symbol like

FNAME,C'ABCDEFG.TXT'

With this value in SYMNAMES dataset overlay with this data when therecord is get

Should be achievable in two steps
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Aug 17, 2012 11:28 am    Post subject:
Reply with quote

Is not it duplicate of http://www.ibmmainframes.com/viewtopic.php?t=59189&start=30 ?
Back to top
View user's profile Send private message
mksranjani

New User


Joined: 03 Feb 2010
Posts: 29
Location: Chennai

PostPosted: Fri Aug 17, 2012 11:33 am    Post subject:
Reply with quote

There is a difference in the input between the 2 topics.
But it is related. Thanks. I would use the other solution provided.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Aug 17, 2012 12:10 pm    Post subject:
Reply with quote

Hope you'll get it going now. Thanks for the follow-up, this helps to keep the thing in sync...
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm


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