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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 1 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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