Page 1 of 1

What is the difference between IKJEFT1A and IKJEFT01 in JCL and DB2.

Posted: Wed Dec 16, 2015 2:57 pm
by Anushka Sharma
Hi,

I have seen JCLs for DB2 making use of IKJEFT1A and IKJEFT01 both. I have mostly used the JCLs using IKJEFT01 but not IKJEFT1A. What is that used for? Does it improve on efficiency?

Re: What is the difference between IKJEFT1A and IKJEFT01 in JCL and DB2.

Posted: Wed Dec 16, 2015 4:10 pm
by enrico-sorichetti
If You had cared to search the manuals You would have found Yourself ...
The program needed to execute TSO/E commands from the background is a terminal monitor program (TMP), which may be one of the following: IKJEFT01, IKJEFT1A, or IKJEFT1B. The EXEC (execute) statement is used to execute program IKJEFT01 or the alternate programs IKJEFT1A and IKJEFT1B. The format is:


//stepname EXEC PGM=IKJEFT01,DYNAMNBR=nn,PARM='command'


Note: The TSO/E terminal monitor program must not run as a V=R program. Executing the TMP as V=R will cause unpredictable results.
stepname is optional and can be used as a step identifier in programs consisting of more than one step.
EXEC is the JCL term that identifies this type of statement.
PGM= specifies the module being executed. In addition to IKJEFT01, there are two other entry points available for background execution that provide additional return code and abend support. The differences among the three entry points are:
PGM=IKJEFT01
When a command completes with a non-zero return code, the program goes to the next command. When a command abends, the step ends with a condition code of 12 (X'C').
PGM=IKJEFT1A
If a command or program being processed by IKJEFT1A ends with a system abend, IKJEFT1A causes the job step to terminate with a X'04C' system completion code. IKJEFT1A also returns to the caller the completion code from the command or program in register 15.
If a command or program being processed by IKJEFT1A ends with a user abend, IKJEFT1A saves the completion code in register 15 and then terminates.
If a command, program or REXX exec being processed by IKJEFT1A returns a non-zero return code to IKJEFT1A, IKJEFT1A saves this return code in register 15 and then terminates. Non-zero return codes to IKJEFT1A from CLISTs will not affect the contents of register 15 and the TMP will continue processing.
For a non-zero return code or an abend from a command or program that was not given control directly by IKJEFT1A, no return code is saved in register 15, and IKJEFT1A does not terminate.
Note: When a command is invoked in a CLIST, that command is actually processed by the TMP (Terminal Monitor Program). From that command, termination of IKJEFT1A with a non zero return code and flushing of the remainder of the CLIST occur. This is different from the case when a command is invoked directly by a REXX exec.

PGM=IKJEFT1B
If a command or program being processed by IKJEFT1B ends with a system or user abend, IKJEFT1B causes the job step to terminate with a X'04C' system completion code. IKJEFT1B also returns to the caller the completion code from the command or program in register 15.
| If a command, program or REXX exec being processed by IKJEFT1B
| returns a non-zero return code to IKJEFT1B, IKJEFT1B saves
| this return code in register 15 and then terminates. Non-zero
| return codes to IKJEFT1B from CLISTs do not affect the
| contents of register 15 and the TMP continues processing.
For a non-zero return code or abend completion code from a program or command that was not given control by IKJEFT1B, no return code is saved in register 15, and IKJEFT1B does not terminate.
to get a better grasp of the concept You might want to run a little REXX with just

Code: Select all

/*REXX*/
return 8
to see what happens when You use ikjeft01 and ikjeft1a/ikjeft1b

Re: What is the difference between IKJEFT1A and IKJEFT01 in JCL and DB2.

Posted: Wed Dec 16, 2015 7:29 pm
by nicc
stepname is optional and can be used as a step identifier in programs consisting of more than one step.
I suspect that "programs" should actually be "jobs" or "procedures" as a program IS one step.

Re: What is the difference between IKJEFT1A and IKJEFT01 in JCL and DB2.

Posted: Thu Dec 17, 2015 4:47 pm
by Anuj Dhawan
nicc wrote:
stepname is optional and can be used as a step identifier in programs consisting of more than one step.
I suspect that "programs" should actually be "jobs" or "procedures" as a program IS one step.
I read the quoted text from Enrico multiple time. Then read the manual multiple time. In manual it has got the orientation of text bit different. I thought that will make a difference. Quoting the text aligning it for better readability:

The EXEC (execute) statement is used to execute program IKJEFT01 or the alternate programs IKJEFT1A and IKJEFT1B. The format is:

//stepname EXEC PGM=IKJEFT01,DYNAMNBR=nn,PARM='command'
or
//stepname EXEC PGM=IKJEFT01,DYNAMBR=nn,PARM='command'

Note: The TSO/E terminal monitor program must not run as a V=R program. Executing the TMP as V=R will cause unpredictable results.
Note: If the caller wishes to pass a command string longer than 100 characters to IKJEFT01, you should use the PARMDD= keyword of the EXEC statement of JCL, as shown above.

stepname
is optional and can be used as a step identifier in programs consisting of more than one step.
But after all that effort - you sound correct, Nic.

Re: What is the difference between IKJEFT1A and IKJEFT01 in JCL and DB2.

Posted: Fri Dec 18, 2015 12:38 pm
by Anushka Sharma
Thanks all for explanation. I did look at the documentation before posting it here. I should have told about that. But the documentation does not say if IKJEFT1A is better, bad, good or something else when used in place of IKJEFT01 for a DB2 Job. Or there is just no difference as long as we are using TSO in batch?

Re: What is the difference between IKJEFT1A and IKJEFT01 in JCL and DB2.

Posted: Fri Dec 18, 2015 5:12 pm
by nicc
It all depends on what you need or are trying to achieve. And which you use is up to you.

Re: What is the difference between IKJEFT1A and IKJEFT01 in JCL and DB2.

Posted: Fri Dec 18, 2015 6:29 pm
by Robert Sample
Or there is just no difference as long as we are using TSO in batch?
It can make a big difference! If you want to know the return code of the program you ran in TSO, you CANNOT use IKJEFT01! And if you get an ABEND, you will see the difference between IKJEFT1A and IKJEFT1B in the ABEND code you get.

Re: What is the difference between IKJEFT1A and IKJEFT01 in JCL and DB2.

Posted: Mon May 09, 2016 3:26 pm
by Anushka Sharma
Robert Sample wrote:It can make a big difference!  If you want to know the return code of the program you ran in TSO, you CANNOT use IKJEFT01!  And if you get an ABEND, you will see the difference between IKJEFT1A and IKJEFT1B in the ABEND code you get.
hmmm,,ok Thanks.