View previous topic :: View next topic
|
Author |
Message |
rsnram007
New User
Joined: 28 Jan 2009 Posts: 11 Location: chennai
|
|
|
|
Hi,
i took below REXX from our FORUM which is used to put display in COBOL program.
Code: |
/* REXX */
/* */
/* DISPLAYS THE PARAGRAPH NAMES IN A COBOL PGM */
/* IT WORKS IF THE EDIT MODE IS NUM ON STD OR NUM OFF */
/* */
ISREDIT MACRO
ADDRESS ISREDIT "F 'PROCEDURE DIVISION' 8 FIRST"
ADDRESS ISREDIT "F P'¬' 8"
DO UNTIL RC > 0
ADDRESS ISREDIT "(THELINE) = LINE .ZCSR"
IF POS("EXIT",THELINE) = 0
& POS("*",THELINE) = 0 ,
& POS("-INC",THELINE) = 0 ,
& POS("COPY",THELINE) = 0
THEN
DO
PARSE VAR THELINE NUM " " LINE1 "." LINE2
LINE3 = STRIP(LINE1,'L'," ")
ADDRESS ISREDIT "LINE_AFTER .ZCSR = ' DISPLAY '"LINE3"''"
END
ADDRESS ISREDIT "F P'¬' 8"
END
|
I opend my COBOL program in EDIT mode after i execute the REXX code. i got return code zero even though i did not get the excepted result ( displays are not in the program ).
I am new to REXX. Can anyone sort out of this?
Thanks in Advance
Regards,
Suresh |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Where do you insert the DISPLAY into the cobol program ? |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
try changing
Code: |
IF POS("EXIT",THELINE) = 0
|
for
Code: |
IF POS("EXIT",THELINE) = 0 ,
|
hth |
|
Back to top |
|
|
rsnram007
New User
Joined: 28 Jan 2009 Posts: 11 Location: chennai
|
|
|
|
Hi,
I want to put display after every section in Procedure Division.
I did above Changes in my Code.now i did not get the exepected result.
Thanks,
Suresh |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You need to post the actual code you are using as well as the undesired output. If any messages were presented, post the message and the id.
For readability, please use copy/paste and the "Code" tag (this also preserves alighment).
Suggest you use a very small program as the sample. |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
Quote: |
/* IT WORKS IF THE EDIT MODE IS NUM ON STD OR NUM OFF */ |
Use Profile to check to see if you have "NUM ON COB", if so use "NUM OFF" then try the REXX again. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
why not include a save of the profile, change the profile, and a change to original profile in the REXX? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
rsnram007 wrote: |
i did not get the excepted result ( displays are not in the program ). |
And what were those unexpected results, please tell us . . . |
|
Back to top |
|
|
|