Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Writing messages between the records using ZCSR

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Writing messages between the records using ZCSR
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: 1103
Location: Oostende, Belgium

PostPosted: Tue Apr 28, 2015 2:11 pm    Post subject: Re: Writing messages between the records using ZCSR
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    Post subject:
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: 1103
Location: Oostende, Belgium

PostPosted: Tue Apr 28, 2015 3:56 pm    Post subject:
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

Senior Member


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

PostPosted: Tue Apr 28, 2015 7:09 pm    Post subject: Reply to: Writing messages between the records using ZCSR
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am
No new posts Web Service VS MQ Messages Ashishpanpaliya All Other Mainframe Topics 1 Wed Feb 28, 2018 10:48 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us