View previous topic :: View next topic
|
Author |
Message |
ssudhanshu
New User
Joined: 28 Apr 2015 Posts: 2 Location: India
|
|
|
|
Hi all,
My requirement is somewhat how it is done after entering "JJ" on command line when a JCL is open. I've a COBOL program on which I need to put a macro which will
1. Write a warning message on first line along with line number and message mentioned.
2. Repeat the same below the line because of which the warning is generated.
These lines entered through REXX will be temporary and will be removed once RES in entered on command line.
Below is the code that I've written -
IF V2 = ' ' THEN
DO
"ISREDIT (ZCSR) = LINE &NUL"
MSG1 = 'LINE ' NUL ': NO PROJ NUMBER FOUND'
ADDRESS "ISPEXEC" */
'ISREDIT LINE_AFTER .ZCSR = MSGLINE (MSG1)'
'ISREDIT LINE_BEFORE .ZFIRST = MSGLINE (MSG1)'
END
NUL contains Line number where warning was found. I am having issues while displaying the line below the issue record ( 'ISREDIT LINE_AFTER .ZCSR = MSGLINE (MSG1)' )
Can anyone please help me on this? |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
ssudhanshu wrote: |
I am having issues while displaying the line below the issue record ( 'ISREDIT LINE_AFTER .ZCSR = MSGLINE (MSG1)' |
And our issue is the fact that we're not clairvoyants...
What issues do you have? |
|
Back to top |
|
|
ssudhanshu
New User
Joined: 28 Apr 2015 Posts: 2 Location: India
|
|
|
|
Hi Robert,
The issue is, this line of code is not working. It's displaying the intended message just below the first line instead of displaying it below the intended line. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
Then, and you should have realised this yourself, ZCSR does not point to the correct line, so
Start looking where you set it up!
Hints:
- add trace ?r as the first line of your macro
- check the returncode of every
Code: |
"isredit whatever ... |
command
after every
Code: |
"isredit whatever ..." |
command, add a line with
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
This line probably does not do what you think it does:
Code: |
"ISREDIT (ZCSR) = LINE &NUL" |
|
|
Back to top |
|
|
|