Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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

Active Member


Joined: 07 Feb 2009
Posts: 984
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

Active Member


Joined: 07 Feb 2009
Posts: 984
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: 2019
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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us