Larry,

I just created a REXX exec to read a tape, submitted it to batch and it 
requested, mounted and read the tape as expected and the EXECIO ended with a 
return code of zero.

So, mounting tapes is possible in TSO/Batch.

However, having said that, I am JES2 not JES3.

Chuck

The REXX:
/* rexx */ 
"alloc fi(tapefile) da('S01CH.PRDC0904.SYS002') SHR"
"execio 10 diskr tapefile (stem taprecs. fini)" 
say rc 

The Tape:

-----------------------------   CA 1 TAPE INQUIRY  ----------------------------
 
Data Set Name . . . : S01CH.PRDC0904.SYS002 
 
General Data                         Creation Information 
 Volume Serial. . . : 321526          Date . . . . . . : 2014/247 
 Alternate Volume . :                 Time . . . . . . : 09:02:00 
 Media type   . . . : 3590-128X       Jobname  . . . . : S01CHUNL 
 Record Format. . . : VB              Program  . . . . : IDMSBCF 
 Record Length. . . : 32756          Last Used Information 
 Block Size   . . . : 32760           Date . . . . . . : 2015/091 
 Number of blocks . : 12320           Time . . . . . . : 13:51:00 
 Percent utilized . : 0               Jobname  . . . . : S01CHTSO 
 Batch ID/Hook ID . : CLOSE IO       Expiration Information 
 Status   . . . . . : ACTIVE          Expire Date. . . : CATALOG 
 
File  / Volume Set                   Vault Management Information 
 Base Volume. . . . : 321526          Outcode. . . . . : 
 Sequence Number. . : 1               Slot   . . . . . : 0000000 
 Total Files in Set : 1               Outdate. . . . . : 
Secondary volumes: 
USER DATA: 
                                                                               
The job:
//S01CHTSO JOB (99CH,8310,,9000),'REXX', TYPRUN=SCAN,
//         CLASS=A,MSGCLASS=X,USER=S01CH 
//         JCLLIB ORDER=S01CH.INCLUDE.JCLLIB 
/*JOBPARM LINES=999999
/*JOBPARM PAGES=999999 
//* 
// INCLUDE MEMBER=TSOBATCH 
//ISPPROF  DD DISP=SHR,DSN=S01CH.BATCH.IPO2.ISPPROF
//SYSTSPRT DD SYSOUT=* 
//SYSTSIN  DD * 
 profile plang(enu) slang(enu) 
 %testtape 

The output:
ACF0C038 ACF2 LOGONID ATTRIBUTES HAVE REPLACED DEFAULT USER ATTRIBUTES
READY
 profile plang(enu) slang(enu) 
READY
 %testtape 
0
READY
END

Charles (Chuck) Hardee
Senior Systems Engineer/Database Administration
EAS Information Technology

Thermo Fisher Scientific
300 Industry Drive | Pittsburgh, PA 15275
Phone +1 (724) 517-2633 | Mobile +1 (412) 877-2809 | FAX: +1 (412) 490-9230
[email protected] | www.thermofisher.com

WORLDWIDE CONFIDENTIALITY NOTE: Dissemination, distribution or copying of this 
e-mail or the information herein by anyone other than the intended recipient, 
or an employee or agent of a system responsible for delivering the message to 
the intended recipient, is prohibited. If you are not the intended recipient, 
please inform the sender and delete all copies.

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Larre Shiller
Sent: Wednesday, April 01, 2015 1:41 PM
To: [email protected]
Subject: dynamic allocation for tape using TSO in batch

Hello -

Please excuse the lack of detail in this post... I'm not a COBOL programmer and 
quite a bit of what is happening here is either outside of my scope of 
understanding and experience or I have no way to directly test some of this.   
There are quite a few "moving parts" involved and I'm not sure which one may be 
the culprit.

We have a production batch job that executes DB2 and a COBOL program using TSO 
in batch (IKJEFT1A).  The COBOL program dynamically allocates DASD data sets as 
input using PUTENV and standard COBOL SELECT and OPEN statements.  The COBOL 
program uses the CATALOG to get the data set names it is interested in uses the 
DSN to do the OPEN.  This has been working for years.  Unfortunately, some of 
the input data sets chaned from DASD data sets to TAPE data sets and the job is 
now getting "failure to allocate" messages:

IKJ56221I DATA SET FOO.BAR NOT ALLOCATED, VOLUME NOT AVAILABLE+

IKJ56221I VOLUME  NECESSARY TO SATISFY YOUR REQUEST NOT ON SYSTEM, AND CANNOT 
BE MOUNTED

...and since we are a JES3 shop, this one gets thrown in as well:

IEF295I FOO.BAR - VOLUME MOUNTING NOT ALLOWED BUT IS NEEDED BY JES3 
INITIALIZATION

I find the IEF295I message (and descriptive text) to be especially cryptic and 
confusing.  I'm not quite sure what failure to mount a volume has to do with 
"JES3 INITIALIZATION", but I suspect the message is probably just ancient and 
poorly worded...

I opened a PMR with IBM, but the essence of what I'm getting back just boils 
down to "...you can't mount a tape from a batch job executing TSO...".  And 
although that certainly seems to be the case here, I guess I'm just skeptical.  
And I can't seem to find that blanket restriction specifically documented 
anywhere.

I have found numerous other "can I dynamically allocate a data set from a COBOL 
program" posts on the Interwebs and I have read quite a few of them, but none 
of them specifically mention tape--at least not the ones that I can find.  And 
one would think that if that were a restriction, it would have been discussed 
or mentioned in at least *one* of them...!  But maybe not.  We even tried 
adding a TSO segment to the batch userID and gave it MOUNT authority, but that 
did not help.  It seems awfully odd that there is no way to permit this, if 
this is indeed a default behavior/restriction... after all, even with the TSO 
restriction, you can still override it with UADS or TSOAUTH...!

I guess I'm just looking for definitive confirmation one way or the other and 
was hoping that somebody would have specific knowledge or experience here.

Thanks for any help...

Larre Shiller
US Social Security Administration

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to