Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 1542
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us