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: 1529
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm


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