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
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