Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum 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: 1161
Location: Vilnius, Lithuania

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: 1161
Location: Vilnius, Lithuania

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: 2136
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 DFSMShsm Dataset Recovery with B and ... Joerg.Findeisen JCL & VSAM 0 Sat Oct 05, 2019 10:01 pm
No new posts Duplicating records in a PDS memebr/I... imcoolleo COBOL Programming 5 Mon Sep 16, 2019 3:32 pm
No new posts Compare duplicate records in same file pshongal DFSORT/ICETOOL 3 Fri Aug 09, 2019 9:37 am
No new posts TSO TEST writing to dataset Harold Barnes IBM Tools 3 Sat Aug 03, 2019 3:02 am
No new posts How to count duplicate key records co... sergeyken SYNCSORT 0 Thu Jul 25, 2019 8:03 pm

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