You need to ask YOUR site support people. They are the ones that set it all up.
How are we supposed to know which load libraries or JCL PROCS they have defined.
----------
I just want a model of it, I will take care of the libraries name you can write any dummy library name. I wanted to know the possible ways of writing a SAS JCL, in case of passing parameters to program , using SYSIN DD * for passing data etc.....
Thanks for all of your information.
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
Quote:
I just want a model of it, I will take care of the libraries name you can write any dummy library name. I wanted to know the possible ways of writing a SAS JCL, in case of passing parameters to program , using SYSIN DD * for passing data etc.....
I have no idea what you mean by this. The simplest way to write SAS JCL is (as Kevin showed):
Code:
// EXEC SAS
//SYSIN DD *
<SAS statements>
/*
If you need to read a file, or write a file, you may need the DD statement for the file (depending upon how you write your SAS code, however, that is not a requirement). SAS has a wide set of parameters that can be set for various reasons, and they can be passed by PARM= or a SAS OPTIONS ... ; statement. Production code rarely uses SYSIN for passing data since the SAS code is read from SYSIN.
As far as the procedure posted by PeterHolland, it is a version 6.09 procedure and therefore dates back many years (2001 or 2002 if I remember correctly). The current release of SAS is 9.2 and the SAS JCL procedure was completely rewritten either in SAS 9.1.3 or 9.2 . Hence if you're using one of these releases you would be better off contacting your site support group for assistance.
If you explain better just what you are looking for, we probably could help you better. Since SAS can be invoked from TSO or a batch job or on a PC or on a Unix machine, you need to clarify your question.
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
At our company nested procs were not allowed, hence the jcl i showed.
(by the way expat EXEC SAS worked all the time, but proc naming
is site depending i guess).
And im not sure that the SAS procs (delivered by SAS) were totally rewritten for new versions like Robert states, I really would like to see
a sample of that.
If you are looking out for examples to plug into the SYSIN in the jcl, this would be helpful:
//step1 EXEC SAS
//FT12F001 DD SYSOUT=<output dataset Name>
//IN1 DDDSN=<input dataset name>,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
OPTIONS PAGESIZE=24;
DATA INPUT;
INFILE IN1 LENGTH=LINELEN;
INPUT @01 PRODUCT ABC.;
PROC FREQ DATA=INPUT;
TITLE 'FREQUENCY OF PRODUCTS ';
TABLES PRODUCT;
RUN;
//*
//*
The above JCL tries to pull the frequency of various products. The frequency is the number of times the value appears for the product. The output is obtained as below