Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
UNIT=AFF for Easytrieve code

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
gandikk

New User


Joined: 16 Mar 2017
Posts: 8
Location: Center Valley, PA

PostPosted: Wed Jul 12, 2017 11:42 pm    Post subject: UNIT=AFF for Easytrieve code
Reply with quote

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
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8154
Location: East Dubuque, Illinois, USA

PostPosted: Wed Jul 12, 2017 11:51 pm    Post subject:
Reply with quote

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
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 563
Location: The Universe

PostPosted: Thu Jul 13, 2017 12:22 am    Post subject:
Reply with quote

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
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 161
Location: Switzerland

PostPosted: Thu Jul 13, 2017 2:22 am    Post subject:
Reply with quote

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
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 563
Location: The Universe

PostPosted: Thu Jul 13, 2017 7:32 am    Post subject:
Reply with quote

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
View user's profile Send private message
gandikk

New User


Joined: 16 Mar 2017
Posts: 8
Location: Center Valley, PA

PostPosted: Fri Jul 14, 2017 11:35 pm    Post subject: Reply to: UNIT=AFF for Easytrieve code
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1868
Location: UK

PostPosted: Sat Jul 15, 2017 12:52 am    Post subject:
Reply with quote

Quote:
Looks like we can't open same tape drive at the same time for 2 separate files.

icon_exclaim.gif icon_exclaim.gif icon_exclaim.gif icon_exclaim.gif icon_exclaim.gif icon_exclaim.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8154
Location: East Dubuque, Illinois, USA

PostPosted: Sat Jul 15, 2017 1:11 am    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. how to code for GDG in Rexx cvnlynn CLIST & REXX 13 Wed Aug 09, 2017 9:13 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts I want to retire TRX and use only Rex... Abhinav Sharma CLIST & REXX 6 Sat Jul 29, 2017 2:53 am
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us