MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Dynamically copy VSAM to PS file

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
pzmohanty
Beginner


Joined: 20 May 2004
Posts: 97
Topics: 43
Location: hyderabad, India

PostPosted: Mon Mar 20, 2006 9:51 am    Post subject: Dynamically copy VSAM to PS file Reply with quote

Hi ,

My requirement is to accept a VSAM dataset name from user in REXX & create a new PS file with attributes same as VSAM file ( like LRECL , RECFM) dynamically in rexx & laso to copy the contents of the VSAM file into the newly created PS file.

Please let me know , can this be done in REXX
_________________
Priya Ranjan Mohanty
Consultant
Kanbay Software (I) pvt. Ltd.
Hyderabad
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Mon Mar 20, 2006 10:14 am    Post subject: Reply with quote

pzmohanty,

Please search before posting. Check this link for generating a JCL within Rexx and submitting it at the end.

http://www.mvsforums.com/helpboards/viewtopic.php?t=42&highlight=submit

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
pzmohanty
Beginner


Joined: 20 May 2004
Posts: 97
Topics: 43
Location: hyderabad, India

PostPosted: Mon Mar 20, 2006 10:26 am    Post subject: Reply with quote

Hi Kolusu ,

May be , my question was not proper...

A job can be created to be submitted by the REXX to copy the VSAM file to PS file.
But my problem , is how to get the RECFM , LRECL of the VSAM file , so that we can create a similar PS file dynamically.

Please let me know , how to extract those attributes of VSAM file from REXX to create a similar PS file. Once PS file is in place , copying the content will not be a problem..
_________________
Priya Ranjan Mohanty
Consultant
Kanbay Software (I) pvt. Ltd.
Hyderabad
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Mon Mar 20, 2006 11:40 am    Post subject: Reply with quote

Quote:

But my problem , is how to get the RECFM , LRECL of the VSAM file , so that we can create a similar PS file dynamically.

Please let me know , how to extract those attributes of VSAM file from REXX to create a similar PS file. Once PS file is in place , copying the content will not be a problem..


pzmohanty,

*Sigh* with SORT utility you don't have to code DCB parameters. The output dataset will have the same DCB properties as the input dataset.

Here is a sample code. I also used the sort parm VSAMEMT so that you can even copy Empty vsam clusters

Code:

/* REXX */                                                         
SAY 'TYPE IN YOUR INPUT VSAM CLUSTER NAME'                         
PARSE PULL INDSN                                                   
SAY 'TYPE IN YOUR OUTPUT PS NAME'                       
PARSE PULL OUTDSN                                                 
QUEUE "//USERNAMEA  JOB (ACCT),MSGCLASS=Y,MSGLEVEL=(1,1),CLASS=A,"
QUEUE "//             NOTIFY=USERID"                             
QUEUE "//*"                                                       
QUEUE "//STEP0100 EXEC PGM=SORT,PARM='VSAMEMT=YES'"               
QUEUE "//SYSOUT   DD SYSOUT=*"                                     
QUEUE "//SORTIN   DD DSN=" || INDSN  || ','                       
QUEUE "//            DISP=SHR"                                     
QUEUE "//SORTOUT  DD DSN=" || OUTDSN || ','                       
QUEUE "//            DISP=(NEW,CATLG,DELETE),"                     
QUEUE "//            UNIT=SYSDA,"                                 
QUEUE "//            SPACE=(CYL,(10,10),RLSE)"                     
QUEUE "//SYSIN    DD *"                                           
QUEUE "  SORT FIELDS=COPY"                                         
QUEUE "/*"                                                         
QUEUE "ZZ"                                                         
'SUBMIT * END(ZZ)'                                                 


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group