|
View previous topic :: View next topic
|
| Author |
Message |
gandikk
New User
Joined: 16 Mar 2017 Posts: 8 Location: Center Valley, PA
|
|
|
|
Hi,
As there is a restriction on the number of tape drives that we can use per step, I tried to use UNIT=AFF in one of my Easytrieve step. I got S413 abend. Is there any issue with my code?
My Code:
| Code: |
//STEP01 EXEC PGM=EZTPA00,REGION=1024K
//SYSPRINT DD SYSOUT=(,)
//SYSSNAP DD SYSOUT=(,)
//SYSOUT DD SYSOUT=(,),DCB=(LRECL=150,BLKSIZE=150)
//EZTVFM DD UNIT=SYSDA,SPACE=(CYL,(100,100))
//INF1 DD DISP=SHR,DSN=INPUT1
//INF2 DD DISP=SHR,DSN=INPUT2
//OUT1 DD DSN=OUTPUT1,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(100,100),RLSE),
// UNIT=CTAPE,VOL=(,,,99),
// DCB=(RECFM=FB,LRECL=9,BLKSIZE=0)
//OUT2 DD DSN=OUTPUT2,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(100,100),RLSE),
// UNIT=AFF=OUT1,VOL=(,,,99),
// DCB=(RECFM=FB,LRECL=9,BLKSIZE=0)
|
Thanks,
Gandikk
Coded after Mr. Sample's comment |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
I think you are dreadfully confused. If you are attempting to allocate a tape data set, why do you have SPACE coded? SPACE is ONLY for DASD data sets and has no meaning for tape. And why do you not have a LABEL parameter for the tape data sets? And why do you not not specify different file sequence numbers for the two output tape data sets? What is your site default retention period for tapes? Since you did not provide EXPDT or RETPD for your output tapes, the site default will set the length of time the tape will be kept -- and the site default may not be what you want.
Furthermore, you need to Code your JCL (using the Code button) to preserve spacing -- being new to the forum, you need to read and understand the forum rules and follow them. |
|
| Back to top |
|
 |
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
There is a restriction about the number of data sets that can be open on one tape volume at one time. It is one.
Now I have overused "one" in this post, and there are other reasons you can get a 413 ABEND. In the JESMSGLG data set in the job you should find an IEC145I message. Look up this message in the MVS System Messages manual for your z/OS release for more detailed information than we can supply in this forum. You should have done this before you started this thread. |
|
| Back to top |
|
 |
Willy Jensen
Active Member

Joined: 01 Sep 2015 Posts: 774 Location: Denmark
|
|
|
|
| Quote: |
| restriction on the number of tape drives that we can use per step |
Well, except from the number of physically available drives, not at far as I know.
But, you specify UNIT=SYSAFF, which means that you want to reuse the same drive.
As to the S413, perhaps EZTPA00 doesn't close OUT1 before opening OUT2? That would certainly screw up the SYSAFF.
REGION=1024K is an awfully small region size in my opinion, but most likely not relevant to your problem. |
|
| Back to top |
|
 |
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
Ignoring the SPACE=... issue that Mr. Sample mentioned, the JCL, as written, will attempt to write the two output data sets on two different "scratch" volumes using one tape drive. The JCL would have to be different to define two different data sets on one volume.
Now, as Mr. Jensen observes, it seems likely that the first output data set is open when Easytrieve attempts to open the second output data set. You cannot do this. Hence the S413 ABEND.
Mr. Jensen's observation that, other than the physical availability of tape drives, there is no practical limit on the number of DD statements that specify a tape is correct. At least I never encountered this as a limiting issue in my career, though I have, from time to time, encountered issues with availability of physical tape drives, as, I'm sure, is also true with Mr. Jensen.
JCL to create two data sets on one tape volume, might be something like this.
| Code: |
//OUTPUT1 DD DISP=(NEW,CATLG,DELETE),
// UNIT=CTAPE,
// VOL=(,RETAIN,,99),
// LABEL=1,
// DSN=OUTPUT1
//OUTPUT2 DD DISP=(NEW,CATLG,DELETE),
// UNIT=AFF=OUTPUT1,
// VOL=(,,,99,REF=*.OUTPUT1),
// LABEL=2,
// DSN=OUTPUT2 |
The program must write the entitre OUTPUT1 data set, then close the data set, and then write the second data set.
JCL like this is common with sort.
| Code: |
//SORTIN DD DISP=OLD,
// UNIT=TAPE,
// VOL=SER=(vol,vol,vol),
// DSN=INPUT
//SORTOUT DD DISP=(NEW,CATLG),
// UNIT=AFF=*.SORTIN,
// VOL=(,,,99),
// DSN=OUTPUT |
|
|
| Back to top |
|
 |
gandikk
New User
Joined: 16 Mar 2017 Posts: 8 Location: Center Valley, PA
|
|
|
|
Thank you mentors!!
Steve, I changed my code as per your suggestions. I got S513 abend this time. Looks like we can't open same tape drive at the same time for 2 separate files.
| Code: |
//STEP01 EXEC PGM=EZTPA00,REGION=1024K
//SYSPRINT DD SYSOUT=(,)
//SYSSNAP DD SYSOUT=(,)
//SYSOUT DD SYSOUT=(,),DCB=(LRECL=150,BLKSIZE=150)
//EZTVFM DD UNIT=SYSDA,SPACE=(CYL,(100,100))
//EZMACLIB DD DSN=DMK.TSOMACRO.DMS0PRTS,DISP=SHR
//INF1 DD DISP=SHR,DSN=Input1
//INF2 DD DISP=SHR,DSN=Input2
//OUT1 DD DSN=Output1,
// DISP=(NEW,CATLG,DELETE),LABEL=1,
// UNIT=CTAPE,VOL=(,RETAIN,,99),
// DCB=(RECFM=FB,LRECL=9,BLKSIZE=0)
//OUT2 DD DSN=Output2,
// DISP=(NEW,CATLG,DELETE),
// UNIT=AFF=OUT1,LABEL=2,
// DCB=(RECFM=FB,LRECL=9,BLKSIZE=0),
// VOL=(,,,99,REF=*.OUT1) |
|
|
| Back to top |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
| Quote: |
| Looks like we can't open same tape drive at the same time for 2 separate files. |
 |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
| Quote: |
| Looks like we can't open same tape drive at the same time for 2 separate files. |
That is why tape is considered serial media -- if you want to have two files open on the same volume at the same time, you use DASD because tape doesn't allow it. The read/write heads can only be at one spot on the tape, always (unless you plan on violating the laws of physics). |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|