JCL to run SAS code



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

JCL to run SAS code

Postby rakeshsneha1212 » Fri May 12, 2017 12:34 pm

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
rakeshsneha1212
 
Posts: 22
Joined: Thu Mar 30, 2017 2:09 pm
Has thanked: 5 times
Been thanked: 0 time

Re: JCL to run SAS code

 

Re: JCL to run SAS code

Postby NicC » Fri May 12, 2017 5:11 pm

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,
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2647
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 99 times

Re: JCL to run SAS code

Postby Robert Sample » Fri May 12, 2017 5:15 pm

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.
Robert Sample
Global moderator
 
Posts: 3288
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 214 times

Re: JCL to run SAS code

Postby rakeshsneha1212 » Mon May 15, 2017 1:19 pm

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
rakeshsneha1212
 
Posts: 22
Joined: Thu Mar 30, 2017 2:09 pm
Has thanked: 5 times
Been thanked: 0 time

Re: JCL to run SAS code

Postby enrico-sorichetti » Mon May 15, 2017 1:54 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2579
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 123 times

Re: JCL to run SAS code

Postby rakeshsneha1212 » Mon May 15, 2017 2:13 pm

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
rakeshsneha1212
 
Posts: 22
Joined: Thu Mar 30, 2017 2:09 pm
Has thanked: 5 times
Been thanked: 0 time

Re: JCL to run SAS code

Postby enrico-sorichetti » Mon May 15, 2017 2:52 pm

googling with SAS COBOL COPYBOOK CONVERSION returned a link to
https://support.sas.com/resources/papers/COB2SAS.pdf
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2579
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 123 times

Re: JCL to run SAS code

Postby vasanthz » Mon May 15, 2017 11:16 pm

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
User avatar
vasanthz
 
Posts: 7
Joined: Thu Aug 05, 2010 2:53 pm
Has thanked: 1 time
Been thanked: 0 time

Re: JCL to run SAS code

Postby rakeshsneha1212 » Tue May 16, 2017 10:48 am

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
rakeshsneha1212
 
Posts: 22
Joined: Thu Mar 30, 2017 2:09 pm
Has thanked: 5 times
Been thanked: 0 time

Re: JCL to run SAS code

Postby NicC » Tue May 16, 2017 6:05 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2647
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 99 times

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post