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.

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.

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.

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.

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.