Page 1 of 1

Mainframe SAS JCL to Korn Shell script conversion

PostPosted: Tue Sep 19, 2017 12:31 pm
by abhityagi
Hi All,

Please help me to the conversion of Mainframe SAS JCL to korn Unix script. Please share the example from SAS JCL to Korn Unix Script.
It be really helpful. Please share the online source also so I can look into it.

Thanks,
Abhishek

Re: Mainframe SAS JCL to Korn Shell script conversion

PostPosted: Tue Sep 19, 2017 1:48 pm
by NicC
I suggest that you do some reseach instead of just going begging for help. I entered this
jcl conversion to unix script
into Google and came up with lots of references that you could research.

Re: Mainframe SAS JCL to Korn Shell script conversion

PostPosted: Tue Sep 19, 2017 2:29 pm
by abhityagi
Nic,

I am getting MVS jcl of conversion not SAS jcl. That's why I am asking in this group if any one can show me the example of SAS JCL conversion to Shell Script. It is not only jcl conversion. Thanks.

Re: Mainframe SAS JCL to Korn Shell script conversion

PostPosted: Tue Sep 19, 2017 3:06 pm
by enrico-sorichetti
SAS jcl.


learn to use the proper terminology, please :evil:

on a z/OS-mvs mainframe forum JCL has a well defined meaning ...
I.E.: the sequence of statements/directives to setup the environment to run a program

You have two choices
1) the MVS jcl statements needed to run SAS
2) the statements read by SAS to implement Your process

for (1) the google search with the suggested arguments should give You enough info to proceed

for (2) You are on Your own ...
reverse engineer the process and implement again in the language of Your choice

Re: Mainframe SAS JCL to Korn Shell script conversion

PostPosted: Tue Sep 19, 2017 3:47 pm
by abhityagi
Sorry for wrong terminology. We are using executing SAS code with the help of Mainframe JCL. Now we are planning to migrate it into Shell scripting. So Instead of using JCL's, we we want to use Shell scripts. Please if any one has worked then share the sample of jcl to Shell scripts conversion please share.

Sample of step which we are using to execute SAS:
//JSTY0010 EXEC SAS,COND=(0,LT),
// OPTIONS='MACRO S=72 DQUOTE CHARCODE NOSTATS CAPSOUT'
//WORK DD UNIT=(SYSDA,20),SPACE=(CYL,(400,400)),BLKSIZE=27648

Re: Mainframe SAS JCL to Korn Shell script conversion

PostPosted: Tue Sep 19, 2017 3:56 pm
by enrico-sorichetti
SAS should have provided the PROCEDURED and some sample JCLS on how to run SAS on z/OS

look at the SAS manuals to find out where the equivalent shell scripts are documented and the samples stored

speak to Your support and to the people who installed SAS to find out about all the above

Re: Mainframe SAS JCL to Korn Shell script conversion

PostPosted: Thu Sep 21, 2017 8:15 pm
by Robert Sample
After multiple posts, you STILL have not clearly identified what you are wanting to do. You need to explain what you want to do in a way that others can understand. From what you have posted, it appears that there are 2 possible things you want to do.

Possibility 1: your company has purchased a SAS license to execute on a Unix machine and you want to convert the JCL that executes your SAS code into shell scripts. If this is what you want to do, contact SAS for assistance since they will know what is necessary to run their system on a Unix machine. You may need to convert some of your SAS code as well since mainframes run EBCDIC natively while Unix machines run ASCII natively, so all sorts of side effects can occur (sorting, for example, will give different results on a mainframe than on a Unix machine). And depending upon the JCL, conversion to shell scripts may be difficult.

Possibility 2: your company wants to remove SAS completely and thus wants to convert the SAS code into something that can be executed on a Unix machine. If this is what you want to do, shell scripts may not be the best way to accomplish what you want; a programming language might be necessary since SAS is a programming language in itself. Converting SAS code to another language can be a challenge since most of the PROC statements will have to be converted into programs (or at least subprograms) in your programming language. Depending upon the complexity of your SAS code, this conversion could take a significant amount of time -- many years ago I had a SAS program to read 3 tapes and generate a report of the data. A COBOL programmer produced the same report but instead of 200 lines of SAS that took a few days to get right, it took 4,000 lines of COBOL and about 6 weeks to code and test. YMMV.