IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Writing messages between the records using ZCSR


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ssudhanshu

New User


Joined: 28 Apr 2015
Posts: 2
Location: India

PostPosted: Tue Apr 28, 2015 12:54 pm
Reply with quote

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
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Tue Apr 28, 2015 2:11 pm
Reply with quote

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
View user's profile Send private message
ssudhanshu

New User


Joined: 28 Apr 2015
Posts: 2
Location: India

PostPosted: Tue Apr 28, 2015 3:19 pm
Reply with quote

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
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Tue Apr 28, 2015 3:56 pm
Reply with quote

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
    Code:
    "isremspy"
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue Apr 28, 2015 7:09 pm
Reply with quote

This line probably does not do what you think it does:
Code:
"ISREDIT (ZCSR) = LINE &NUL"
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Two input files & writing counter... DFSORT/ICETOOL 12
Search our Forums:

Back to Top