Need clarification on OUTFIL.



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

Need clarification on OUTFIL.

Postby gokulNmf » Mon Apr 26, 2010 6:31 pm

Hi,
I executed the below jcl it was working fine.
//SORT1 EXEC PGM=SORT                               
//SYSOUT   DD SYSOUT=*                               
//SYSPRINT DD SYSOUT=*                               
//SORTDIAG DD DUMMY                                 
//SORTIN   DD DSN=NO01.XXX.JCL(SXBXJ#01),DISP=SHR   
//SORTOF1  DD DSN=NO01.XXX.JCL.SORTOF01,DISP=SHR     
//SORTOF2  DD DSN=NO01.XXX.JCL.SORTOF02,DISP=SHR     
//*                                                 
//SYSIN DD *                                         
  OPTION COPY                                         
  OUTFIL INCLUDE=(3,2,CH,EQ,C'AM'),FNAMES=SORTOF1     
  OUTFIL INCLUDE=(3,2,CH,NE,C'AM'),FNAMES=SORTOF2     
/*                                                   


i again ran the jcl with little modification, i changed the output DS to PDS,
//SORT1 EXEC PGM=SORT                               
//SYSOUT   DD SYSOUT=*                             
//SYSPRINT DD SYSOUT=*                             
//SORTDIAG DD DUMMY                                 
//SORTIN   DD DSN=NO01.XXX.JCL(SXBXJ#01),DISP=SHR   
//SORTOF1  DD DSN=NO01.XXX.JCL(SXBXJ#02),DISP=SHR   
//SORTOF2  DD DSN=NO01.XXXXJCL(SXBXJ#03),DISP=SHR   
//*                                                 
//SYSIN DD *                                       
  OPTION COPY                                       
  OUTFIL INCLUDE=(3,2,CH,EQ,C'AM'),FNAMES=SORTOF1   
  OUTFIL INCLUDE=(3,2,CH,NE,C'AM'),FNAMES=SORTOF2   
/*                                                 

and now the job abend with S213;
i checked the Abend Assist it stated that "The system tried to open a DASD data set and encountered difficulties. This ABEND customarily occurs when the dataset name specified in the DSNAME parameter does not exist.".
But both the DS where present, so I tried like
//SORT1 EXEC PGM=SORT                                   
//SYSOUT   DD SYSOUT=*                                 
//SYSPRINT DD SYSOUT=*                                 
//SORTDIAG DD DUMMY                                     
//SORTIN   DD DSN=NO01.XXX.JCL(SXBXJ#01),DISP=SHR       
//SORTOF1  DD DSN=NO01.XXX.JCL(SXBXJ#02),DISP=SHR       
//SORTOF2  DD DSN=NO01.XXX.JCL(SXBXJ#03),DISP=SHR       
//*                                                     
//SYSIN DD *                                           
  OPTION COPY                                           
  OUTFIL INCLUDE=(3,2,CH,EQ,C'AM'),FNAMES=SORTOF1         
/*                                                     
//*                                                     

in the outfil i gave SORTOF1 and 2 separately and tried, then the job executed with RC = 0. Form this i am clear that i made some mistake in the PDS concept, but i am confused :? , can you please help me understand what mistake i made?

Thanks in Advance,
Gokul
User avatar
gokulNmf
 
Posts: 118
Joined: Sat Mar 28, 2009 6:41 pm
Location: India
Has thanked: 2 times
Been thanked: 0 time

Re: Need clarification on OUTFIL.

Postby William Thompson » Mon Apr 26, 2010 7:37 pm

Could it be the extra 'X' in the SORTOF2?
//SORTOF2 DD DSN=NO01.XXXXJCL(SXBXJ#03),DISP=SHR
William Thompson
 
Posts: 81
Joined: Sat Jun 09, 2007 4:24 am
Location: Tucson AZ
Has thanked: 0 time
Been thanked: 1 time

Re: Need clarification on OUTFIL.

Postby gokulNmf » Mon Apr 26, 2010 8:51 pm

i am extremely sorry.. :oops: .. its hard to read between lines.. i am correcting that part of the code..
its not the extra 'X'.. its an typo error....

i again ran the jcl with little modification, i changed the output DS to PDS,

 
//SORT1 EXEC PGM=SORT                               
//SYSOUT   DD SYSOUT=*                             
//SYSPRINT DD SYSOUT=*                             
//SORTDIAG DD DUMMY                                 
//SORTIN   DD DSN=NO01.XXX.JCL(SXBXJ#01),DISP=SHR   
//SORTOF1  DD DSN=NO01.XXX.JCL(SXBXJ#02),DISP=SHR   
//SORTOF2  DD DSN=NO01.XXX.JCL(SXBXJ#03),DISP=SHR   
//*                                                 
//SYSIN DD *                                       
    OPTION COPY                                       
    OUTFIL INCLUDE=(3,2,CH,EQ,C'AM'),FNAMES=SORTOF1   
    OUTFIL INCLUDE=(3,2,CH,NE,C'AM'),FNAMES=SORTOF2   
/*                   
Cheers,
Gokul
User avatar
gokulNmf
 
Posts: 118
Joined: Sat Mar 28, 2009 6:41 pm
Location: India
Has thanked: 2 times
Been thanked: 0 time

Re: Need clarification on OUTFIL.

Postby enrico-sorichetti » Mon Apr 26, 2010 9:07 pm

//SORTOF1  DD DSN=NO01.XXX.JCL(SXBXJ#02),DISP=SHR
//SORTOF2  DD DSN=NO01.XXX.JCL(SXBXJ#03),DISP=SHR   


You cannot have open at the same time in output mode more than one member of a pds!
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: 3002
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Need clarification on OUTFIL.

Postby gokulNmf » Tue Apr 27, 2010 3:27 pm

Hi Enrico,
I after considering you point i tried running the same jcl (with pds member in both input and output) in another
Mainframes system, it was wotking fine in that system.
So i thought of checking the PDS Data Set Information and its stated below:
Mainframes system in which jcl abend:
Data class . . . . . : **None**
 Organization  . . . : PO       
 Record format . . . : FB       
 Record length . . . : 80       
 Block size  . . . . : 27920   
 1st extent tracks . : 29       
 Secondary tracks  . : 10       
 Data set name type  : PDS

and Mainframes sytem in which jcl ran fine:
Data class . . . . . : PDSE   
 Organization  . . . : PO     
 Record format . . . : FB     
 Record length . . . : 80     
 Block size  . . . . : 32720 
 1st extent tracks . : 100   
 Secondary tracks  . : 10     
 Data set name type  : LIBRARY

Can this affect in anyway?
Cheers,
Gokul
User avatar
gokulNmf
 
Posts: 118
Joined: Sat Mar 28, 2009 6:41 pm
Location: India
Has thanked: 2 times
Been thanked: 0 time

Re: Need clarification on OUTFIL.

Postby gokulNmf » Tue Apr 27, 2010 4:02 pm

Hi all,
I ran the jcl after copying the member to a new pds with the following Data Set Information
Data class . . . . . : **None** 
 Organization  . . . : PO       
 Record format . . . : FB       
 Record length . . . : 80       
 Block size  . . . . : 27920     
 1st extent tracks . : 2         
 Secondary tracks  . : 1         
 Data set name type  : LIBRARY   

with only change in "Data set name type" as library. And now the jcl ran fine.
But the question is why in "Data set name type = PDS" the jcl abended?
Can you please help me on this?
Cheers,
Gokul
User avatar
gokulNmf
 
Posts: 118
Joined: Sat Mar 28, 2009 6:41 pm
Location: India
Has thanked: 2 times
Been thanked: 0 time

Re: Need clarification on OUTFIL.

Postby expat » Tue Apr 27, 2010 4:03 pm

Here, let me find the documentation for you. Can't have you doing too much yourself, can we.

Click HERE and read.
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: Need clarification on OUTFIL.

Postby enrico-sorichetti » Tue Apr 27, 2010 5:14 pm

the limitation I was talking about concerns PDS not PDSE
that' s why it works in one system and not in the other one
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: 3002
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times


Return to JCL