0

While going through a JCL job, i found the following code snippet. What does this mean? How do we know what %var2fix contains?

//JS0005 EXEC PGM=IKJEFT01  
//SYSEXEC DD DSN=ISPFGRP.ICEC.ISPFEXEC,DISP=SHR  
//INPUT DD DSN=PSMC.CMDS.N001(0),DISP=SHR  
//SYSPRINT DD SYSOUT=*  
//SYSUDUMP DD SYSOUT=*  
//SYSTSPRT DD SYSOUT=*  
//SYSTSIN DD *  
%VAR2FIX  
/*
  • 1
    It doesn't contain anything. It is not a variable. If you are expected to use this jobstep, someone at your site should tell you the value of that piece of text, no-one else can even begin to guess. It is just text. Someone knows what is on the SYSEXEC and what it does to INPUT and what purpose SYSTSIN is used for, and it isn't anyone outside of your site, and possibly not even outside your department. – Bill Woodger Jan 13 '17 at 09:48
  • I'm voting to close this question as off-topic because entirely specific to your site. – Bill Woodger Jan 13 '17 at 09:48
  • 1
    @BillWoodger, perhaps consider that although the full answer itself cannot be given, that some could learn from this question. – MikeT Jan 13 '17 at 09:58
  • @MikeT perhaps you should consider not answering questions like this. It is not StackOverflow's intention to be a site where any "question" is fine, as long as "something" could be learned. "What letter to do I type next?". "Well, we can't really help you with the specifics, but can inform you that the range is probably A-Z. You'll need to consider other possibilities, like a-z, and even, perhaps, numeric digits are possible or other symbols or 'special characters' that are on your keyboard". – Bill Woodger Jan 13 '17 at 17:33

1 Answers1

4

The first thing of importance is the program that is invoked by the JCL, which is IKJEFT01, which is basically TSO (TIME SHARING OPTION) via batch. If for argument's sake the program were IEFBR14 (do nothing based upon BR 14 which is Branch to Register 14, Register 14 holding the return address). The SYSTSIN is not even opened and thus %VAR2FIX wouldn't even be looked.

Back to IKJEFT01 the ddname SYSTSIN is read as Terminal Input i.e. it's basically the command line for native TSO. As such %VAR2FIX is a command, which you could replicate by typing TSO %VAR2FIX where a command can be typed (note the vast majority of people don't directly use native TSO nowadays, rather they use a "friendlier environment" such as ISPF/PDF or Roscoe).

Now if instead of %VAR2FIX there was IEFBR14 then I could say what that meant as IEFBR14 is a well known common program that can be invoked as a command. e.g. you could do TSO IEFBR14 (remember it does nothing). Now %VAR2FIX is not a common command, in fact it is virtually definitely an in-house command.

Back to the JCL, there is a DD statement with a dd name of SYSEXEC, which, if I recall correctly, allows Rexx programs, in the respective dataset, to be run as commands. I think if you look at the dataset allocated to SYSEXEC you will find a member called VAR2FIX and it is this program/command that will be invoked. If I recall correctly the % is ignored as regards to the command name.

MikeT
  • 51,415
  • 16
  • 49
  • 68
  • From memory the % --> clist/rexx; for example if you had a rexx pgm IEFBR14, typing IEFBR14 would execute the standard IEFBR14 but %IEFBR14 would execute the rexx pgm. The % allows you to execute a clist/rexx with same name as a standard command. So you are correct VAR2FIX is almost certainly a rexx pgm in ISPFGRP.ICEC.ISPFEXEC – Bruce Martin Jan 13 '17 at 10:25
  • 1
    @BruceMartin, yep that's what I thought (looks at DD allocations before system libs if I ... :)) but was getting a little tired of *If I recall correctly.* :) – MikeT Jan 13 '17 at 11:23
  • Thanks Mike for the most helpful post! As I opened the PDS allocated to SYSEXEC, I found a member named VAR2FIX which has REXX code. – Radhika Mathur Jan 13 '17 at 11:41