Page 1 of 2

JCL to run SAS code

PostPosted: Fri May 12, 2017 12:34 pm
by rakeshsneha1212
Hi,

I have cobol program which is converting the COBOL copy book related fields to equivalent SAS fields. Now i need to run this SAS code using JCL with input as my COBOL dataset and need the output in cobol output dataset after mapping the copy book fileds to the corresponding data in the input dataset.

Can some one provide me the sample JCL to achieve this.


Regards,
Rakesh MS

Re: JCL to run SAS code

PostPosted: Fri May 12, 2017 5:11 pm
by NicC
If you are running a SAS program then you use your standard SAS JCL with DD statements for your inut and output data sets. If this is not what you mean then you need to explain better,

Re: JCL to run SAS code

PostPosted: Fri May 12, 2017 5:15 pm
by Robert Sample
Talk to your coworkers or site support group. SAS is NOT part of z/OS and as such must be paid for separately, so not every site has SAS installed on its mainframe (especially since SAS is very expensive). IF your site has SAS, the name of the PROC to use depends upon the site, so only someone working AT YOUR SITE could possibly answer your question.

Re: JCL to run SAS code

PostPosted: Mon May 15, 2017 1:19 pm
by rakeshsneha1212
NicC wrote:If you are running a SAS program then you use your standard SAS JCL with DD statements for your inut and output data sets. If this is not what you mean then you need to explain better,


Hi Nicc,

I have standard SAS JCL but not able achieve what i want. below ais what i am trying to do and what i want in my output dataset.

Input
1) I am trying run a SAS jcl with COBOL data file as input, the JCL control card contain SAS euqivalent parameters which will be executed when we run the JCL.

Output
1) I want my COBOL data file to map with the SAS control parameters(i.e the COBOL copy book layout) and get the output in CSV format.

What i am getting now :

I am getting the raw data (with out mapping) and also mapped data ( with mapping to cobol copy book) but they are not in proper format.


Regards,
Rakesh MS

Re: JCL to run SAS code

PostPosted: Mon May 15, 2017 1:54 pm
by enrico-sorichetti
I am getting the raw data (with out mapping) and also mapped data ( with mapping to cobol copy book) but they are not in proper format.


if the JOB did run, if SAS did not complain, if the JOB return code was acceptable...
then it is NOT a JCL problem, it is NOT a SAS problem,
it is a YOUR CODE problem :mrgreen: RIP

Re: JCL to run SAS code

PostPosted: Mon May 15, 2017 2:13 pm
by rakeshsneha1212
enrico-sorichetti wrote:
I am getting the raw data (with out mapping) and also mapped data ( with mapping to cobol copy book) but they are not in proper format.


if the JOB did run, if SAS did not complain, if the JOB return code was acceptable...
then it is NOT a JCL problem, it is NOT a SAS problem,
it is a YOUR CODE problem :mrgreen: RIP



:lol: :lol: enrico, just finding a help in solving this. May be i am missing some thing which is causing me to get the data in improper format. it is SAS which has to handle the end results if i am not wrong. I need the syntax to achieve mapping the data to the copy book.

Regards,
Rakesh MS

Re: JCL to run SAS code

PostPosted: Mon May 15, 2017 2:52 pm
by enrico-sorichetti
googling with SAS COBOL COPYBOOK CONVERSION returned a link to
https://support.sas.com/resources/papers/COB2SAS.pdf

Re: JCL to run SAS code

PostPosted: Mon May 15, 2017 11:16 pm
by vasanthz
Show us

sample input data
program that you are running
expected output data
the output the program is producing currently.
Error messages if there are any.

With these we can better arrive at a solution

Regards,
Vasanth.S

Re: JCL to run SAS code

PostPosted: Tue May 16, 2017 10:48 am
by rakeshsneha1212
vasanthz wrote:Show us

sample input data
program that you are running
expected output data
the output the program is producing currently.
Error messages if there are any.

With these we can better arrive at a solution

Regards,
Vasanth.S


Hi Vasanth,

It is not possible for me to give you sample data, coz i work for a banking domain and it's difficult for me give those details. Can you please give me personal email ID i can share you the screen shots.

Regards,
Rakesh MS

Re: JCL to run SAS code

PostPosted: Tue May 16, 2017 6:05 pm
by NicC
Of course you can share - just take some data and change it so that there is no real information there (account numbers, sort codes, names).

Taking it offline means the topic can no longer be of any use to anyone in the future and that you will have wasted everyones time.