what is difference about JCL, CLIST and REXX



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

what is difference about JCL, CLIST and REXX

Postby lxw039 » Tue Oct 07, 2008 11:57 pm

hi, there
I am a beginner for IBM mainframe, I'm confusing for lots of concepts,
anybody knows the difference among the CLIST, REXX or JCL?
can they realize the same function?
can JCL instead of REXX or they are totally deffrent tool?
if I want to learn sth. which one is the best choice for me,REXX or JCL.
can JCL do everything for mainframe?
thank you very much!
lxw039
 
Posts: 47
Joined: Tue Oct 07, 2008 11:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: what is difference about JCL, CLIST and REXX

 

Re: what is difference about JCL, CLIST and REXX

Postby MrSpock » Wed Oct 08, 2008 1:22 am

JCL (Job Control Language) is the language used to create batch jobs. Batch jobs run in the background and cannot communicate interactively with a user or with a terminal.

JCL is relatively simple and straight-forward. There are only a few constructs to be concerned with. Here's a simple example:

//JOBNAME JOB (ACCOUNTING DETAILS),CLASS=X,MSGCLASS=X,...
//STEP1 EXEC PGM=MYPROG
//DD1 DD DSN=MY.DATASET,DISP=...

The JOB statement identifies your job to the system. A valid JOBNAME is required. Almost everything on the JOB statement will be dictated by your site's standards, so check with those to see how your JOB statement should be constructed. There is only one JOB statement per job.

The EXEC statement tells your job what Program (EXEC PGM=) or JCL Procedure (EXEC PROCNAME or EXEC PROC=PROCNAME) to execute. A step name (STEP1 in the example) is usually provided, but is not mandatory. Again, your site's standards will dictate this. A program is an executable (compiled) object, sometimes known as a load module. A JCL procedure is just a collection of JCL statements that perform a specific repetitive function.

The DD, or Data Definition statement, defines all of the necessary input and output as required by the program. The author of the program will determine what the names of the Data Definition entries will be. There should be at least one unique DD statement for each required input or output dataset.

The job can pass parameters to the program by means of the PARM= parameter of the EXEC statement. A maximum of 100 characters can be passed from the job to the program.

The only way that a program can communicate to the executing job is via the RETURN-CODE special register. The program can pass a numeric value of 0-4095 to the RETURN-CODE register, which the job can interrogate once that step has completed. The job can then perform or skip certain steps based on the value of the RETURN-CODE register.

In most shops, production JCL is written and maintained by the Production Support team, based on the requirements set forth by the application development team.

CLIST, or Command List, is an interpreted programming language that allows you to develop automated TSO/E and/or ISPF processes. These programs will run in the foreground, i.e. within a TSO/E address space. CLIST is very rarely used in modern shops, and you'll find few programmers that know how to code in it.

REXX, or REstructued eXtended eXecution language, is an interpreted or (optionally) compiled programming language. It runs natively in the foreground within a TSO/E address space, or in the background from within an MVS address space. Many tools and products provide extensions that allow them to be accessed and/or automated from a REXX program.

As far as which language to learn, I can't really comment, since I don't know what your role is going to be. JCL is the easiest and, with a limited set of constructs, should take no time to learn. I'd suggest skipping CLIST all together. I'd suggest learning about MVS utilities, data storage, TSO/E and the library of TSO commands, then learning about ISPF and ISPF Services and ISPF EDIT macros before tackling CLIST or REXX.
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: what is difference about JCL, CLIST and REXX

Postby lxw039 » Wed Oct 08, 2008 2:33 am

Thank you veryvery... much Mr. MrSpock.
I got a lots from your perfect suggestion, right now my work is focus in mainframe batch processing(cobol programming),
I will learn in the order you suggest me.
one more thing, do you think It's hard to learn REXX? thank you again!!!!!!
have a nice day!
lxw039
 
Posts: 47
Joined: Tue Oct 07, 2008 11:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: what is difference about JCL, CLIST and REXX

Postby dick scherrer » Wed Oct 08, 2008 2:36 am

Mr Spock,

Nicely done :!:

d
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: what is difference about JCL, CLIST and REXX

Postby MrSpock » Wed Oct 08, 2008 8:12 am

Thanks for the kind words. It's just nice after being involved in these forums for many years to be able to cut through a lot of the mis-information we often see. JCL is simple. All it does is tell the system what programs to execute and provides the necessary system resources. It's not a programming language, and it's not some magical utility that can do everything.

REXX is the same. It's certainly easier to learn than COBOL, and has a relatively small set of instructions. It's a fantastic resource for parsing data and for dealing with strings and substrings and text. There are no datatypes other than alphanumeric. Variables are defined on the fly. I think too many new programmers struggle with learning the external environmental commands for TSO/E or ISPF, which I usually presume they already know from writing COBOL. As I already mentioned, those need to be understood first before any code can be written.
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: what is difference about JCL, CLIST and REXX

Postby Bill Dennis » Wed Oct 08, 2008 6:31 pm

Another point to make is that what JCL does in batch can mostly be accomplished in Foreground using CLIST or REXX. Allocate files and invoke a program. They are all similar in this regard.
Regards,

Bill Dennis

Disclaimer: My comments on this forum are my own and do not represent the opinions or suggestions of any other person or business entity.
Bill Dennis
 
Posts: 278
Joined: Thu May 15, 2008 9:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: what is difference about JCL, CLIST and REXX

Postby lxw039 » Wed Oct 08, 2008 6:54 pm

thank you, Mr. Mrspock, what you said will be as my bible for my work, as you say, could you suggest some
good books for " learning about MVS utilities, data storage, TSO/E and the library of TSO commands, then learning about ISPF and ISPF Services and ISPF EDIT macros before tackling CLIST or REXX." by your experience, I think I have to take about 5 years to master these Knowledge and skill, but it's valuable in my life , what do you think about it?
enjoy IBM mainframe!!!
lxw039
 
Posts: 47
Joined: Tue Oct 07, 2008 11:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: what is difference about JCL, CLIST and REXX

Postby lxw039 » Wed Oct 08, 2008 7:03 pm

thanks Bill Dennis's notes for supplement.
lxw039
 
Posts: 47
Joined: Tue Oct 07, 2008 11:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: what is difference about JCL, CLIST and REXX

Postby helen_he » Wed Oct 08, 2008 9:42 pm

Hi there,
I was working on mainframe for short time too. As a new person for this, I have some points.
First, READ program
When you read codes, you can understand the rules and functions very well.
Second, PRACTICE
As you try some test program, you will get some interesting in it.
So, maybe you really don't need quite long time to master ......
By the way, I just say, no mean I did it. :)

Good luck!
helen_he
 
Posts: 17
Joined: Tue Sep 30, 2008 3:55 am
Has thanked: 0 time
Been thanked: 0 time

Re: what is difference about JCL, CLIST and REXX

Postby lxw039 » Wed Oct 08, 2008 10:26 pm

thanks for your expeirence , Helen_he, it's helpful for me.
lxw039
 
Posts: 47
Joined: Tue Oct 07, 2008 11:49 pm
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post