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

ISPF ISREDIT Adding New Line

Status
Not open for further replies.

RLAINE

Programmer
Oct 25, 2011
1
US
I have the below REXX to add one line(OLINE) at the end of a file.
The ADDLINE MACRO is being called and it adds the one line, but when i open the file the added lines are not showing up.
What would cause these new lines not to be showing using 3.4?

166 *-* SAY 'OLINE:' OLINE
OLINE: 10/25/11,09:51:11,10/24/11,0,0,0,
167 *-* ADDRESS ISPEXEC
168 *-* "VPUT (OLINE)"
>>> "VPUT (OLINE)"
169 *-* "EDIT DATASET("DSN") MACRO(ADDLINE)"
>>> "EDIT DATASET(CTDPROD.V7001.WRK.PRD1.STATS) MACRO(ADDLINE)"
ISREDIT VAR FOR OLINE IS 10/25/11,09:51:11,10/24/11,0,0,0,
THE LINE NUMBER OF THE LAST LINE IS 00000041
ISREDIT WAS SAVED
170 *-* SAY 'RETURNING FROM ADDLINE MACRO'
RETURNING FROM ADDLINE MACRO


/* REXX MACRO PROGRAM ADDLINE */
ADDRESS ISPEXEC "VGET (OLINE)"
ADDRESS ISREDIT
'MACRO'
SAY 'ISREDIT VAR FOR OLINE IS' OLINE
/* GET THE LINE NUMBER OF THE LAST LINE */
ADDRESS ISREDIT "(LASTLINE) = LINENUM .ZL"
SAY "THE LINE NUMBER OF THE LAST LINE IS " LASTLINE
"ISREDIT LINE_AFTER "LASTLINE" = (OLINE)"
'SAVE'
SAY 'ISREDIT WAS SAVED'
'END'
EXIT
 
Suggest you check the return code after each statement in the macro.

You might also trace the macro.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top