View previous topic :: View next topic
|
Author |
Message |
Wayne_in_Texas
New User

Joined: 28 Dec 2024 Posts: 10 Location: USA
|
|
|
|
Note: I've been retired a number of years now and no current access to a mainframe. I'm drawing this mostly from memory (and some saved stuff) so let me know if I've screwed something up and if this is all really common knowledge now and not really relevant, I apologize.
I rarely deleted lines when modifying JCL to do a temporary submit as it’s so easy to forget and exit out saving the member. Admittedly this goes back to when we only had ‘Edit’ and ‘Browse’ and you had to use Edit to modify lines to submit. ‘View’ has now replaced that function but I still did things the same.
Editing lines in a member can be time consuming EVEN when you want to comment them out permanently and SAVE the member. Especially a lot of JCL lines. I started using some ISPF commands to make this go faster years ago. It only requires setting up ONE PF key. I used Shift PF9 (PF21) as a quick way to comment the lines by doing a shift.
PF21 definition was
C ' ' '//*' 1 ALL X;res (note that's 3 spaces in the first set of quotes)
This PF Key has to be set up in the ISRSPEC screen (Edit or View)
In Edit (or View), put ‘))’ at the beginning of the Line command sequence of the FIRST line of a group (don't worry about the rest of the sequence numbers). Put '))3' at the beginning of the Line command sequence of the LAST line of the group (again, ignore the rest of the sequence numbers). Pressing "Enter" will slide all these lines over 3 positions to the right. Put ‘XX’ into the sequence# of the first and 'XX' into the sequence# of the last line of the group that are now blank in 1-3 and press PF21 to replace the blanks with ‘//*’. The ‘res’ at the end of the command does a reset so the screen returns clean.
Submit the job and Exit without saving. If done in View you're good to go since you can't save anyway. |
|
Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2159 Location: USA
|
|
|
|
It's all true, but my opinion: it is more suitable for the Beginners Forum, isn't it?
All these hints are for the first-year training on ISPF... |
|
Back to top |
|
 |
Wayne_in_Texas
New User

Joined: 28 Dec 2024 Posts: 10 Location: USA
|
|
|
|
Using //* to comment lines is a beginner activity, but I've found from my years of rubbing shoulders with co-coders at 6 major corporations that the tip to use a predefined PF Key along with Exclude (XX) to quickly alter blocks of JCL was an "aha" moment to many programmers well past beginner level. But that's just my opinion.
If inappropriate, I'm sure the moderators will move it. |
|
Back to top |
|
 |
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 767 Location: Whitby, ON, Canada
|
|
|
|
I find it easier to use the XX..XX line command to exclude the lines that I don’t want to submit. Then you can use SUB NX to submit the non excluded JCL lines. Very simple and nearly idiot proof. |
|
Back to top |
|
 |
Wayne_in_Texas
New User

Joined: 28 Dec 2024 Posts: 10 Location: USA
|
|
|
|
True, works too, but having OCD I liked to see the lines commented out on the submit. Just a visual thing to me. ¯\_(",)_/¯ |
|
Back to top |
|
 |
|