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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ISPF edit MACRO to copy a Temp PDS member into another PDS member

Status
Not open for further replies.

balsu79

Programmer
Jun 9, 2007
2
0
0
US
Hi, I searched my best to find an answer in this forum. But could not find it. So, I am raising this question.

How to copy the contents of a Temporary PDS member before the first line of a regular PDS member.

I have a regular PDS member 'XXXXXX.SPUFI(SQL)'

Contents of it is

//Line01
//Line02
//Line03

I want to copy 'SPFTEMP1.CNTL' before the first line. This PDS can have multiple lines.

I have acquired SPFTEMP1.CNTL thru the following syntax

"ISPEXEC FTOPEN TEMP"
"ISPEXEC FTINCL " myskeleton
"ISPEXEC FTCLOSE"
ADDRESS ISPEXEC "VGET ZTEMPF"
 

ZTEMPF is the datasetname. VGET ZTEMPN, the DDname, instead. Then you can
Code:
address TSO "EXECIO * DISKR" ztempn "(FINIS"
The contents are now loaded to the queue and you can
Code:
"LABEL 1 = .STRT 0"
do queued()
   parse pull line
   "LINE_BEFORE .STRT = (line)"
end


Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
If your code is part of a MACRO, you can include the following after the VGET ZTEMPF statement:

"ISREDIT COPY '"ZTEMPF"' BEFORE .ZFIRST"

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top