Date: Mon, 12 Apr 2010 11:33:48 -0400
Reply-To: Nathaniel Wooding <nathaniel.wooding@DOM.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Nathaniel Wooding <nathaniel.wooding@DOM.COM>
Subject: Re: MVS Filename vs DD DSNAME=
In-Reply-To: <201004121442.o3CAl8Wa022076@malibu.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"
Dave
I just concocted a simple two step job:
//TOG19841 JOB (7000SC,IN14),'WOODING ',CLASS=T,MSGCLASS=X,
// MSGLEVEL=(1,1),NOTIFY=TOG1984,SCHENV=ANY
//STEP1 EXEC SAS
//IN DD DSN=OOOCTA.DATALIB.DATA,DISP=OLD
DATA ;
//STEP2 EXEC SAS
//OUT DD DSN=TOG1984.DATALIB.SEQ,DISP=OLD
PROC SOURCE INDD=IN OUTDD=OUT ;
SELECT P: ;
As you see, the first step uses JCL to allocate a partitioned data set; The second step refers to that previously allocate set and, if it were able to 'see' it, would have dumped members that start with 'P' into a flat file. However, the second step does not have access to files allocated in the first step as is shown by the log from step 2:
1 PROC SOURCE INDD=IN OUTDD=OUT ;
2 SELECT P: ;
ERROR: NO LOGICAL ASSIGN FOR FILENAME IN.
ERROR: NO LOGICAL ASSIGN FOR FILENAME IN.
ERROR: NO LOGICAL ASSIGN FOR FILENAME IN.
ERROR: UNABLE TO OPEN INDD=IN.
ERROR: UNABLE TO OPEN INDD=IN.
ERROR: UNABLE TO OPEN INDD=IN.
So, in your second step, you must do all of the allocations that the step needs.
Nat
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Dave Brewer
Sent: Monday, April 12, 2010 10:43 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: MVS Filename vs DD DSNAME=
Jack,
There is no SAS log because the job fails with a JCL error. I am just
going to use JCL to allocate my transport file.
Thank you so much for your assistance.
Dave
On Mon, 12 Apr 2010 07:20:21 -0700, Jack Hamilton <jfh@STANFORDALUMNI.ORG>
wrote:
>Could you post the SAS log for the step that creates the CPORT file? I
think it is not working correctly.
>
>It is possible that your site is set up in a way that disallows the use
of dynamic allocation, or handles it in a non-standard way. If so,
creating the CPORT file with JCL would be the best workaround.
>
>The IAT4401 message indicates that you're running on a JES3 system. I
have no experience with JES3, only with JES2. But a JES2 system would
handle this correctly, and cataloguing (or uncataloguing) a file inside a
program is a common technique.
>
>--
>Jack Hamilton
>jfh@alumni.stanford.org
>Caelum non animum mutant qui trans mare currunt.
>
>On Apr 12, 2010, at 6:19 , Dave Brewer wrote:
>
>> Jack,
>>
>> I replaced the comma with a semicolon and got the same result: JCL
error.
>>
>> Here is a snippet from the JESMSGLG:
>>
>> 08:10:14 IAT4401 LOCATE FOR STEP=PKZIP DD=INPUT
DSN=S539DEB.TEST.CPORT
>> 08:10:14 IAT4404 DATASET NOT FOUND ON MAIN PROCESSOR
>> SYP
>> 08:10:14 IAT4801 JOB S539DEBX (JOB25167) EXPRESS CANCELED BY INTERPRETER
>> DSP
>>
>> I still think that JES internal reader scans the catalog looking for all
>> existing data sets and doesn't know that in Step 1 SAS is allocating a
new
>> data set.
>>
>> Again, thanks so much for your concern and help.
>> Davfe
>>
>> On Mon, 12 Apr 2010 06:00:37 -0700, Jack Hamilton
<jfh@STANFORDALUMNI.ORG>
>> wrote:
>>
>>> When I run your job under 9.1.3, I get syntax errors in the SAS code.
>> There's no semicolon at the end of the first statement, so this would
>> never have run. It also didn't like the DCB clause.
>>>
>>> The FILENAME statement failed, so the file was never created, so the
>> second step got a JCL error.
>>>
>>> I changed the SAS code to
>>>
>>> =====
>>> FILENAME TRANFILE '.TEST.CPORT'
>>> DISP=(,CATLG,DELETE)
>>> LRECL=80 RECFM=FB BLKSIZE=8000
>>> SPACE=(CYL,(250,25),RLSE);
>>>
>>> proc copy in=sashelp out=work;
>>> select class;
>>> run;
>>>
>>> PROC CPORT LIBRARY=work FILE=TRANFILE ;
>>> RUN;
>>> =====
>>>
>>> It ran without error.
>>>
>>> When I ran it a second time, it got a JCL error (not catalogued 2),
>> because the //OUTPUT file already existed.
>>>
>>> Questions:
>>>
>>> 1) Are you sure that the code you sent us was the code you ran?
>>>
>>> 2) Did your first step run without error?
>>>
>>> 3) Did you get the same JCL error every time?
>>>
>>>
>>> I would make two changes to your job:
>>>
>>> 1) Allocate the CPORT file in JCL instead of with a FILENAME statement.
>>>
>>> 2) Put in a new first IEFBR14 step to delete the output files before
you
>> try to re-create them.
>>>
>>>
>>> --
>>> Jack Hamilton
>>> jfh@alumni.stanford.org
>>> Caelum non animum mutant qui trans mare currunt.
>>>
>>> On Apr 12, 2010, at 5:10 , Dave Brewer wrote:
>>>
>>>> //STEP1 EXEC SAS,TIME=420
>>>> //WORK DD UNIT=SYSDA,SPACE=(CYL,(2000,500))
>>>> //LIBRARY DD DSN=MDPPRD.MDP.FMTLIB6,DISP=SHR
>>>> //SYSIN DD *
>>>> FILENAME TRANFILE '.TEST.CPORT'
>>>> DISP=(,CATLG,DELETE)
>>>> DCB=(LRECL=80,RECFM=FB,BLKSIZE=8000)
>>>> SPACE=(CYL,(250,25),RLSE),
>>>> LIBNAME CONCATLB
>>>> (
>>>> 'MDPPRD.MDP.SAS.PMO10.QTR1',
>>>> 'MDPPRD.MDP.SAS.PBO10.QTR1',
>>>> ) DISP=SHR ;
>>>> PROC CPORT LIBRARY=CONCATLB FILE=TRANFILE ;
>>>> RUN;
>>>> //*
>>>> //* ------------------------------------------------------- *
>>>> //* THIS JOB SHRINKS A FILE *
>>>> //* ------------------------------------------------------- *
>>>> //*
>>>> //STEP2 EXEC PKZIP,DF=LB,REGION=0M,TIME=1440
>>>> //SYSPRINT DD SYSOUT=*
>>>> //INPUT DD DSN=&SYSUID..TEST.CPORT,DISP=SHR
>>>> //OUTPUT DD DSN=S539DEB.TEST.ZIP,
>>>> // DISP=(,CATLG,DELETE),
>>>> // SPACE=(CYL,(100,10),RLSE)
>>>> //SYSIN DD *
>>>> -ACTION(ADD)
>>>> -ARCHOUTDD(OUTPUT)
>>>> -INDD(INPUT)
>>>> -TEMPSPACE(CYL)
>>>> -TEMPPRIMARY(1000)
>>>> -TEMPSECONDARY(50)
>>>> -TEMP_SPACE_MULTIVOL=Y
>>>> -TEMP_UNIT(SYSDA)
>>>> -DATA_STORAGE=25M
>>>> /*
>>
>>
>>
CONFIDENTIALITY NOTICE: This electronic message contains
information which may be legally confidential and or privileged and
does not in any case represent a firm ENERGY COMMODITY bid or offer
relating thereto which binds the sender without an additional
express written confirmation to that effect. The information is
intended solely for the individual or entity named above and access
by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying, distribution, or use of the
contents of this information is prohibited and may be unlawful. If
you have received this electronic transmission in error, please
reply immediately to the sender that you have received the message
in error, and delete it. Thank you.
|