what is "DD DSN=&CARDLIB(UTTS9)" and "EXEC PGM=MCIABEND,COND"

JES2/3, JCL, utilities.
Post Reply
User avatar
demecarv
Registered Member
Posts: 52
Joined: Sat Sep 12, 2015 2:03 am

what is "DD DSN=&CARDLIB(UTTS9)" and "EXEC PGM=MCIABEND,COND"

Post by demecarv »

I am Java developer and I am very new in TSO and JCL. I have to move some files from Development mainframe to Production Mainframe. I learned recently how to move files from my local PC to Dev. Mainframe via certain FTP tool named here Connection Central. I learned recently how to browse in Mainframe via OpenText Host Explorer but, in Prod I have only permission to read files (I can't download or upload). There is certain JCL script created by someone else in order to copy files from Dev to Prod but it is not working as expected neither this person is reachable so, I am trying hard to understand.
The main step is:

Code: Select all

//STEP010  EXEC PGM=IKJEFT01
//SYSPRINT DD  SYSOUT=*
//SYSTSPRT DD  SYSOUT=*
//STDOUT   DD  SYSOUT=*
//STDERR   DD  SYSOUT=*
//SYSTSIN  DD  DSN=&CARDLIB(UTTS6272),DISP=SHR
//MCIA010  EXEC PGM=MCIABEND,COND=(0,EQ,STEP010)
By reading the MVS JCL User's guide, I got a basic idea how it works.
1 - PGM=IKJEFT01 -> aimed to allow TSO/E copy command
2 - Sysout=* -> I guess it prints in somewhere the logs
3 - //some_word -> just an alias to the command line
4 - DD -> type of statement
5 - DISP=SHR -> a command informing that the file can be read by multiple jobs at same time
6 - EXEC PGM=MCIABEND -> the execution of some program within MVS but how to find MCIABEND so I can read it?
That is all I could understand after many hours reading the manual. Could someone explain for a begginer what is happening in this snippet and inform what might be UTTS6272 and MCIABEND and how can I find them in UNIX via OpenText? I know it is impossible to someone describe depeely but I just need some basic idea so I can focus in more proper topics.
I guess the process to copy the files from Dev to Prod happens thanks to these two commands or external files UTTS6272 and MCIABEND but I am quite confused about both and I don't know how to find them for investigation.
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: what is "DD DSN=&CARDLIB(UTTS9)" and "EXEC PGM=MCIABEND,COND"

Post by nicc »

First: // indicates a JCL statement. There are various kinds but going through you code snippet (which I have coded for you so that it is readable):
The first line is commonly called an EXEC statement for obvious reasons - the keyword is EXEC. PGM = indicates that the step is to execute a program - in this case IKJEFT01 which is batch TSO. Lines with DD are called - DD statements. This EXEC statement is given the label (step name) STEP010.
The next 4 lines tell the system to write output written to these DDNAMES (file handles is probably how you would understand them in JAVA) to the same output class as the message class (MSGCLASS) on the job statement.
SYSTSIN is the DDNAME (file handle) that TSO uses to get it input from. In this case from a member (UTTS6272) of a library whose name is provided elsewhere in the job - look for // CARDLIB=some.library.name. This member is what you need to look at.
and then we come to anothe EXEC statement. This one executes program MCIABEND depending on the return code from the previous step. Judging by its name its purpose is to abend the job if it executes. It is an in-house program so no-one can tell you for sure except people at your place but you do not need to worry about it.
Regards
Nic
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: what is "DD DSN=&CARDLIB(UTTS9)" and "EXEC PGM=MCIABEND,COND"

Post by Anuj Dhawan »

1 - PGM=IKJEFT01 -> aimed to allow TSO/E copy command
2 - Sysout=* -> I guess it prints in somewhere the logs
3 - //some_word -> just an alias to the command line
4 - DD -> type of statement
5 - DISP=SHR -> a command informing that the file can be read by multiple jobs at same time
6 - EXEC PGM=MCIABEND -> the execution of some program within MVS but how to find MCIABEND so I can read it?
Most of, what you've said, is correct but said differently.
  • 1. IKJEFT01 is a program (no it's a utility! - we'll keep that discussion out of the scope of this thread). Whenever you want to execute (a program or a PROCedure ) EXECute statement, as Nic has said, instructs to EXECute it.

    2. SYSOUT is short for SYStem OUTput. Usually, it gives the diagnostic information about the program execution in that step. STEP010 in your case.

    3. "//" is an indicator to the system that it's a JCL statement. so every statement which preceded by // is a JCL statement. If it is not it can be something else but not a JCL statement. It's not an alias to command line.

    4. DD stands for "Data definition". Data definition statement is used to describe a data set and to specify the input and output resources needed for the data set. You can read more about them here: DD Statement. (Tip: For the moment keep the link just as a reference.)

    5. DISP is short for DISPosition and SHR is short for SHaRe -- so yes, your interpretation is correct. LIB is short for, LIBrary, usually*. It's like a folder on windows. From your example CARDLIB is a PDS (folder) which has a member name ("some content" in the folder) UTTS6272. I'd hazard a guess that this should be the FTP commands.

    Please note - you are using "&" in front of CARDLIB - that makes it a symbolic parameter. For your example, this helps a programmer to refer to the long directory name (QULA1.QUAL2.QUAL3.CARDLIB, QUAL=qualifier) by a short name. At the time of job execution this symbolic will refer back to it's long name defined in the start of the Job somewhere to get resolved to "long name". Said all that, in your JCL, the part of which you show - search for CARDLIB and see what PDS is associated with it. Once you know that, go to ISPF 3.4, give the PDS name, enter and locate the member UTTS6272. This should give a start to analyze.

    Having said all that - I'd also ask you to post the SYSOUT information from the failed job for us, as you've said
    but it is not working as expected
    6. You should not be bothered about MCIABEND program because this will execute only when STEP010 has malfunctioned (because of COND=(0,EQ,STEP010) - but we'll leave the discussion on COND for the moment). If that malfunctions, files are not copied from test to prod and that's what you are after.
Summary: Do the following:
  1. In your JCL, the part of which you show - search for CARDLIB and see what PDS is associated with it.
  2. Once you know that, go to ISPF 3.4, give the PDS name, enter and locate the member UTTS6272 in the PDS. Post the content here after removing any sensitive information.
  3. Post the SYSOUT from the failed job here.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: what is "DD DSN=&CARDLIB(UTTS9)" and "EXEC PGM=MCIABEND,COND"

Post by nicc »

just adding:
  • There are 3 other identifiers starting in cc1 that identify a JCL card:
    1. // as the only data on a card denotes end of job. It is not required.
    2. //* indicates a comment
    3. /* indicates end of inline data
  • A Utility is a program and I would not call IKJEFT01 a utility - it is TSO and we do not refer to interactive TSO as a utility
  • JCL is not executed - it is read and interpreted when submitted and then discarded! In the interpretation phase a note is taken of its contents and various control blocks are set up ready for when the job starts executing. You can think of your JCL submission as a memo from you to the OS saying "Hey Mr OS! When you can , please run these programs and, by the way, these are the resources the programs require and what you shoukd do if any one of them does not do its work properly". The OS then reads the memo, takes notes as required, and chucks it in the bin and then, when the time comes, actions its notes.
Regards
Nic
User avatar
demecarv
Registered Member
Posts: 52
Joined: Sat Sep 12, 2015 2:03 am

Re: what is "DD DSN=&CARDLIB(UTTS9)" and "EXEC PGM=MCIABEND,COND"

Post by demecarv »

Firstly, thanks to all.
1 - What is the difference between EXEC PGM=IDCAMS and EXEC PGM=IKJEFT01? Could someone make an analogy with similar utility in Windows or Linux or even DOS(I don't need an extensive comparison; just a simple analogy)

2 - In my snippet, 6 - EXEC PGM=MCIABEND will only be executed when the previous line return error, right? I mean, if DSN=&CARDLIB(UTTS6272) executes successfully MCIABEND will not execute, right? If I understood correctly, how can it be possible? I found UTTS6272 after the helps provided above and it only contains the shell commands:
BPXBATCH SH +
mount -f OMVS.MySrv.DTL.MyApp.TEMP.ZFS -t ZFS /tmp/MOVE/MyApp/DTL
I guess that COND=(0,EQ,STEP010) works like "if step010 returned 0 then do so something". Does "0" mean errors? And what does "EQ" mean?

3 - Is "ZFS" a known term in mainframe world or is this just a convention name? I found the comments in other steps:
//* DEFINE A BACKUP ZFS FOR DTF PROD ENVIRONMENT
//* FORMAT THE BACKUP ZFS
//* MOUNT THE BACKUP ZFS TO /tmp/MOVE/MyApp/DVL
//* UNMOUNT BACKUP ZFS

4 - What are the differences among //SYSPRINT //SYSTSPRT //STDOUT //STDERR? If I understood correctly they were "routed" or "pointed" to SYSOUT. Why do I need four lines to show the errors? I guess that might exist a reason for this. Maybe STDERR shows the errors, STDOUT the warnings (it is just an example to make clear my question)

5 - Probably the most newbie question: how do I create a PDS and a member inside of. I will not have privilege to create in PROD but I can test it in Dev. My question is really from a beginner. If the same question would make to a Linux guy he probably would answer, open a VI editor or if it was asked to a Windows guy he would answer open a notepad and save it in some folder under C:\user\your_name with .bat extension. Please, just an overview so I know what I have to search for.

6 - How to find the Sysout. I tried in ISPF, enter SD (SDSF) then enter ST (Status of Jobs) and then I got stuck. I guess that now should be something like FIND some_word_itentifying_the_sysout
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: what is "DD DSN=&CARDLIB(UTTS9)" and "EXEC PGM=MCIABEND,COND"

Post by William Collins »

1. The difference between using "copy" in a batch file and initiating a new "shell" in a batch file. But don't take it too literally. There is no "shell" running underneath a batch program.
2. "If zero is equal to the Condition Code/Return Code of the named step, run this step, else flush it".
3. Could be either, as we can't see anything but comments, which could be referring to anything. Have a look at this: http://www.redbooks.ibm.com/abstracts/s ... .html?Open
4. Just the name of an external file. In your own programs, you could name a file BANANA if you wanted and it was OK with your local standards. The only real standardisation in your examples is the DDs relating to message files from Unix. There is some "conventional" use otherwise, but since not everything followed the same convention there are differences.

SYSOUT= indicates a spool dataset. //SYSOUT DD SYSOUT=something will send the output to the "spool" which is managed by JES2 (or JES3).

5. In the SPF Editor, on the member list type S newmem and press return. Use the F1 key extensively. There is a lot of information there which will ease your life.

6.In SDSF find the JOB name you submitted. Then S(elect) (will show all spool datasets associated with the JOB and which haven't completed processing) or ? which will show a list of the spool files, which can then be S(elected) individually.

In general, have a look here, http://www.redbooks.ibm.com/abstracts/s ... .html?Open, and get a better basic understanding.
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: what is "DD DSN=&CARDLIB(UTTS9)" and "EXEC PGM=MCIABEND,COND"

Post by nicc »

To create a PDS:
ISPF option 3.2
Hit F1 (or whatever key is the help key)
Read the help
Hit F3 to get back to the Dataset Allocation panel. (panel is mainframe speak for screen/page)
Fill in the name of the PDS - usually yourid.somethng.type. Example

Code: Select all

===> BIGJOE
===> PYROLL
===> COBOL
(Note: ===> may be . . . I don't have an access on this machine to cut'n'paste)
Further down specify some space - the minimum allocation is 1 track. I almost always allocate by track so where it asks for allocation type enter TRACKS
Specify the primary quantity - say 1 or 15 (for a full cylinder but that is overkill for a learning dataset)
Specify a secondary quantity - say 1
Specify an amount for 'directory blocks' (an internal index to the contents of the PDS) - say 1
Specify dataset type - PDS or LIBRARY
Hit enter
=2 on the command line and hit enter. This takes you to option 2 - the editor
If your newly allocated PDS is not pre-filled then type it in again using the same format as for 3.2. Do not enter it in 'Other Dataset...'. It will now be remebered across functions until you change it. (Some functions keep a note of the name you used separate from the name you used in hte editor)
Where it says MEMBER ===> enter the name of a new member. This can be any name - your PDS is empty so you will not have a name conflict.
Hit enter and start editing.
Regards
Nic
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: what is "DD DSN=&CARDLIB(UTTS9)" and "EXEC PGM=MCIABEND,COND"

Post by Anuj Dhawan »

Hi demecarv,

Please follow OQOT rule - One Question One Thread. You've got around 6 questions right there in a single post.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: what is "DD DSN=&CARDLIB(UTTS9)" and "EXEC PGM=MCIABEND,COND"

Post by Anuj Dhawan »

In addition to the answer from William and Nic - I'll also try to answer your question slowly though curious to know why are you asking this question?
1 - What is the difference between EXEC PGM=IDCAMS and EXEC PGM=IKJEFT01? Could someone make an analogy with similar utility in Windows or Linux or even DOS(I don't need an extensive comparison; just a simple analogy)
Example of executing LISTCAT or TSO commands comes to mind along with what William has referred to but why do you ask, as this is a separate question than your original question.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “JCL - Job Control Language.”