Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy ps data file to PDS memebr. 1

Status
Not open for further replies.

shuhaibk54

Technical User
Jun 12, 2012
18
IN
I am new to rexx coding can any one hepl me to write the code to copy ps data file to pds member ..


Thanks,
Shuhaib


 
It's not actually a REXX problem; it's more 'allocate' which is a system function.

So, the sequential (PS) file exists and is to be copied to a member of an existing PDS:
Code:
"ALLOC FI(PS) DA(the.dataset.name) SHR REUSE"
"ALLOC FI(PO) DA(the.partitioned.dataset(member)) SHR REUSE"
"EXECIO * DISKR PS (FINIS"
"EXECIO" queued() "DISKW PO (FINIS"
FREE FI(PS PO)"
Note the use of "REUSE" to eliminate the possibly-unnecessary initial 'FREE'.

Frank Clarke
--America's source for adverse opinions since 1943.
 
Thanks a lot!!!
Its working

Thanks,
Shuhaib

"ALLOC FI(PS) DA(the.dataset.name) SHR REUSE"
"ALLOC FI(PO) DA(the.partitioned.dataset(member)) SHR REUSE"
"EXECIO * DISKR PS (FINIS"
"EXECIO" queued() "DISKW PO (FINIS"
"FREE FI(PS PO)"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top