well, there might be a problem with what your system knows SAS as (SAS,
SAS8, SAS6, SASTST, whatevertheheck). Here is a sample, but this can vary
//jobname JOB stuff
//STEP1 EXEC SAS
//MYDATA DD DSN=MY.DATA.FILE,DISP=SHR
//SYSIN DD *
data test ;
infile mydata ;
JCL is _never_ in lower case. "stepnames" (jobname, stepname, ddname) are
8 (max) alphanumeric chars, begin with alpha. Don't let your JCL get past
col 70 (ok, 71) or it will be seen as 'continued' on the next line.
usually only a dd-stmt will be continued and it is easiest to break at a
natural place: where there is a comma:
//NEWFILE DD DSN=NEW,FILE,DISP=(NEW,CATLG,DELETE),
Use the minimum JCL you need. A dataset is NEW only once. if you are
writing one, don't leave the complete jcl above in your code on a second
run. You can comment out lines 1 and 2 ("//* "), and change the
"disp" to "DISP=SHR ,CATLG,DELETE)," -- I just overtyped the "(NEW" ...
JCL stops on the line when it encounters a blank...never sees the rest.
be careful writing to a PDS that you NOT include DCB info as the info on
the JCL overrides anything stored on the disk or tape. if you use
incorrect DCB info, you will overwrite the "DSCB" and the file may be
Gary DeWard Brown has a _very_ handy book on JCL. look for it or go to
Amazon and order it. Good luck, and hth --Joe
On Tue, 24 Oct 2000, Chris Smith wrote:
> I have a SAS program which cycles through millions of records, sorting and
> scoring, etc.
> I have been unable to run it completely on an MVS OS/390 mainframe
> completely (it chokes after a 4 million record sort when writing the
> records back).
> I was told that I should wrap it up in a JCL skeleton and run it in batch
> mode. However, I don't know the first thing about JCL, or about how our
> programmers have set things up where I work.
> Piece of advice number two was to obtain a boilerplate, stick my code in
> and try and run it.
> Can someone help me obtain, or lend some advice or JCL code that precedes
> and follows the SAS code I need to run, please? Also, what do I need to be
> aware of to do this, pitfalls, potential problems, etc?
> Is there a good reference book, or does SAS offer a course?
> I appreciate all your help. -- Chris