Jul 12, 2012 #1 shuhaibk54 Technical User Joined Jun 12, 2012 Messages 18 Location 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
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
Jul 12, 2012 1 #2 rexxhead Programmer Joined Jul 31, 2002 Messages 611 Location US 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. Upvote 0 Downvote
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.
Jul 13, 2012 Thread starter #3 shuhaibk54 Technical User Joined Jun 12, 2012 Messages 18 Location IN 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)" Upvote 0 Downvote
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)"