View previous topic :: View next topic |
Author |
Message |
ANDY Beginner
Joined: 07 Feb 2004 Posts: 127 Topics: 67
|
Posted: Fri Feb 27, 2004 11:41 pm Post subject: About CLIST/REXX ? |
|
|
Hi:
We can do most job using JCL. Why do we need CLIST/REXX to do the same thing? Can someone give me some explanation ?
Thank you.
Andy |
|
Back to top |
|
|
Maton_Man Beginner
Joined: 30 Jan 2004 Posts: 123 Topics: 0
|
Posted: Sun Feb 29, 2004 6:36 pm Post subject: |
|
|
JCL is used to execute programs. It is not a program in itself nor can it make programming decisions (leaving aside it's extremely rudimentary IF..THEN..ELSE capability). Most of the output you will be interested in from the execution of JCL is program driven not a result of the JCL per se.
CLIST and REXX are utility languages which allow you to create programs which you can either execute from your TSO session or via JCL.
To highlight their respective usefulness further I propose the following (somwhat crude) example.
In TSO you have two commands for transferring small volumes of data from one system to another - TRANSMIT and RECEIVE. In order to get data from one system to the other you issue the TRANSMIT command. You can do this using JCL, CLIST or REXX.
Now - to actually have the data catalogued on the system you sent it to, you have to issue a RECEIVE command on that system with parameters that specify what to do if the data is new or what to do if the data already exists. You can do this also using JCL, CLIST or REXX.
There is a delay (commensurate with the amount of data you are sending) between when the TRANSMIT is issued and when the RECEIVE can be issued on the destination system. It may be seconds or it may be minutes!!! You cannot automate this process with JCL alone as it has no ability to decide when the data has arrived so that it can issue the RECEIVE. This issue can however be solved with CLIST and REXX in conjunction with JCL.
Job 1
Step 1. Issue the TRANSMIT via a TSO step
Step 2. Submit via the internal reader, a job which executes on the target system
Job 2
Step 1. Execute Rexx/CLIST which issues a RECEIVE command, determines whether there is anything to receive or not and either RECEIVEs it or goes to sleep for a while before trying again. Continue trying to receive for a set amount of time after which you fail the job if no data arrives and go and check the links!!!
Do you understand the difference now?
Regards Maton. _________________ My opinions are exactly that. |
|
Back to top |
|
|
ANDY Beginner
Joined: 07 Feb 2004 Posts: 127 Topics: 67
|
Posted: Mon Mar 01, 2004 1:55 am Post subject: |
|
|
Hi Maton:
Thank you very much for your explanation.
From your explanation, I know there have some things only Rexx/CLIST can do and JCL can not. Is this the main reason we chose Rexx/CLIST? If a thing can be done using either of them, What's the usually choice?
Regards,
Andy |
|
Back to top |
|
|
|
|