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
 

 

RC =20 in ISREDIT macro in REXX
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
rohitpillai09

New User


Joined: 24 Jun 2009
Posts: 8
Location: Pune

PostPosted: Mon Aug 24, 2009 4:59 pm    Post subject: RC =20 in ISREDIT macro in REXX
Reply with quote

Hi All,

I'm trying to execute an ISREDIT macro embedded in REXX.

address ispexec
trace i?

"ISREDIT MACRO"
"ISREDIT CAPS OFF"
"ISREDIT (LINE1) = LINENUM .ZCSR" /* Cursor Position/Current Line */
"ISREDIT (END1) = LINENUM .ZLAST" /* Last line in the file */
"ISREDIT (ST1) = LINENUM .ZFIRST" /* First line in the file */
cur_line = LINE1
st_line = 0
end_line = 0

The TRACE output that I receive is RC = 20. The TRACE output is as below:
24 *-* /* This is to Identify a Macro.
25 *-* "ISREDIT MACRO"
>L> "ISREDIT MACRO"
+++ RC(20) +++
26 *-* "ISREDIT CAPS OFF"
>L> "ISREDIT CAPS OFF"
+++ RC(20) +++

The cur_line should contain the current line position but the ISR macro is not able to pick up the line number. Please suggest and let me know for more information.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Aug 24, 2009 5:08 pm    Post subject:
Reply with quote

Is the macro resident within a SYSPROC or SYSEXEC concatenated library
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Aug 24, 2009 5:23 pm    Post subject:
Reply with quote

why do you have: address ispexec ?
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 985
Location: Oostende, Belgium

PostPosted: Mon Aug 24, 2009 5:26 pm    Post subject:
Reply with quote

Show the whole exec/macro, including the 24 lines before the "ISREDIT MACRO" statement!
Back to top
View user's profile Send private message
rohitpillai09

New User


Joined: 24 Jun 2009
Posts: 8
Location: Pune

PostPosted: Mon Aug 24, 2009 6:11 pm    Post subject: Reply to: RC =20 in ISREDIT macro in REXX
Reply with quote

Hi All,

The REXX code starts with Address ISPEXEC. The lines before that are comment lines, thats why its showing as Line 24.
The macro is present in my personal PDS. ISPEXEC is used to indicate the start of macro.
If it is allowed I can attach the whole source code. I think there is some problem with ISREDIT command as it is not able to read the line number.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Aug 24, 2009 6:15 pm    Post subject:
Reply with quote

Is your personal PDS concatenated into SYSEXEC or SYSPROC, as asked previously.

Quote:
ISPEXEC is used to indicate the start of macro.

Why on earth do you think that.

Quote:
I think there is some problem with ISREDIT command as it is not able to read the line number.

I on the other hand think that your macro is not in the correct concatenation.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Mon Aug 24, 2009 9:14 pm    Post subject: Reply to: RC =20 in ISREDIT macro in REXX
Reply with quote

Code:
25 *-* "ISREDIT MACRO"
>L> "ISREDIT MACRO"
+++ RC(20) +++

I think this means you are not inside of the editor. An editor macro has to run inside of the editor.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Mon Aug 24, 2009 11:23 pm    Post subject: Reply to: RC =20 in ISREDIT macro in REXX
Reply with quote

I was thinking the same thing, although I can't imagine how you'd have your cursor placed on a line if you weren't in Edit/View.
Back to top
View user's profile Send private message
rohitpillai09

New User


Joined: 24 Jun 2009
Posts: 8
Location: Pune

PostPosted: Tue Aug 25, 2009 11:48 am    Post subject: Reply to: RC =20 in ISREDIT macro in REXX
Reply with quote

Hi All,
The REXX macro will comment out the complete step in a JCL or PROC. When we place the cursor on the linenum on extreme left and give command "tso exec <pdsname>(CSTEP)", it keeps on scanning the lines above to find the EXEC command. Once it finds it, it will scan downwards to find the next EXEC command. All the lines between these two commands will be commented out.
Now in the macro IRSEDIT is used to determine the line number.
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Tue Aug 25, 2009 11:54 am    Post subject: Re: Reply to: RC =20 in ISREDIT macro in REXX
Reply with quote

rohitpillai09 wrote:
we place the cursor on the linenum on extreme left and give command "tso exec <pdsname>(CSTEP) ..."

Is this how you are trying to start an editor macro called CSTEP? Edit macros are editor commands, not TSO commands. Just type CSTEP
Back to top
View user's profile Send private message
rohitpillai09

New User


Joined: 24 Jun 2009
Posts: 8
Location: Pune

PostPosted: Tue Aug 25, 2009 12:01 pm    Post subject: Reply to: RC =20 in ISREDIT macro in REXX
Reply with quote

Yes, I'm trying to invoke the editor macro by giving tso exec command because when i give only CSTEp on command line, it throws me an error " Command Not Found". Please find the attached source code for the same.
Guys I'm new to mainframe so please understand the concern and repeated queries.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Aug 25, 2009 12:04 pm    Post subject:
Reply with quote

You DO NOT TSO EXEC a macro.

Hence my previous two posts asking, and not being answered, is your PDS concatenated into SYSEXEC or SYSPROC.

If the answer is NO - then go away and read the ALTLIB statement.

Then after using it you can type the name of your macro on the command line, put the cursor where you want and hit enter and perhaps then you may see the desired results.
** run the ALTLIB in the ISPF session that you wish to perform your macro work **

We do not sit here asking questions about what you have and have not done because we have nothing better to do, it is because we need more information to try and resolve your problem.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Aug 25, 2009 12:08 pm    Post subject:
Reply with quote

Please DO NOT post attachments as I for one can not open them. And the less people that can open them - the less people that can help you.
Back to top
View user's profile Send private message
rohitpillai09

New User


Joined: 24 Jun 2009
Posts: 8
Location: Pune

PostPosted: Tue Aug 25, 2009 12:17 pm    Post subject: RC =20 in ISREDIT macro in REXX
Reply with quote

How do I concatenate my PDS into SYSEXEC or SYSPROC and after that execute the macro?
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 985
Location: Oostende, Belgium

PostPosted: Tue Aug 25, 2009 12:28 pm    Post subject:
Reply with quote

Commenting out means that if you remove the comment, the original code will work again as it did before. Your code adds '//*~' to a line, which does wonders for in-stream data that extends to column 80, for parameters that extend past column 71.

The only way to bullet-proof comment out sections of JCL so that they can be restored later, is to

  • add a dummy IEFBR14 step as the first step of the JOB, so that there is a return code to allow you to comment out the first step
  • add an impossible to match IF-ENDIF condition around the steps to comment out, i.e.
    Code:
    //IFSKIP    IF RC < 4 & RC > 8 THEN
    //*
    -  -  -  -  -  -  -  -  -  -  -  -  -
    //SA010   EXEC PGM=WHATEVER
    -  -  -  -  -  -  -  -  -  -  -  -  -
    //*
    //IFSKIPE   ENDIF

Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Aug 25, 2009 12:28 pm    Post subject:
Reply with quote

I have given you the answer above
and reiterate it below

If the answer is NO - then go away and read the ALTLIB statement.
Back to top
View user's profile Send private message
rohitpillai09

New User


Joined: 24 Jun 2009
Posts: 8
Location: Pune

PostPosted: Tue Aug 25, 2009 1:05 pm    Post subject: RC =20 in ISREDIT macro in REXX
Reply with quote

I dont see how IEFBR14 and an impossible IF-ENDIF condition would help.
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 985
Location: Oostende, Belgium

PostPosted: Tue Aug 25, 2009 1:31 pm    Post subject:
Reply with quote

That's because you're obviously not smart enough to realize that I am commenting on your hopelessly crappy macro. Adding "//*~" comments to lines will irreparably damage JCL statements extending past column 68 and in-stream data that extends past column 76.
Back to top
View user's profile Send private message
rohitpillai09

New User


Joined: 24 Jun 2009
Posts: 8
Location: Pune

PostPosted: Tue Aug 25, 2009 2:01 pm    Post subject: Reply to: RC =20 in ISREDIT macro in REXX
Reply with quote

So if i'm not smart enough, can you help me as to how should I go about achieving my goal of making a tool that comments a complete Step of JCL/PROC. What should be the logic thatI must look at?
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 985
Location: Oostende, Belgium

PostPosted: Tue Aug 25, 2009 3:28 pm    Post subject:
Reply with quote

I told you, add a dummy IEFBR14 to get a returncode and enclose your to-be-commented-out step with an IF-ENDIF statement that can never evaluate to true.
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 -> TSO/ISPF All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


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