Question related to TMS tape dataset and vol serial



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

Question related to TMS tape dataset and vol serial

Postby Revathi » Fri Mar 24, 2017 12:56 pm

Hi,

I'm looking for a solution how to read vol serial number of a TMS dataset (which is dynamic) and pass that value in a JCL,

For eg:

//COPY EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=(,)
//IN DD DSN=inputfile,
// DISP=SHR,
// UNIT=CTAPE,VOL=SER=VOLSER
//OUT DD DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// DCB=(LRECL=10,BLKSIZE=0,RECFM=FB),
// DSN=outputfile
//SYSIN DD *

Currently i'm manually passing the vol ser number but i need this to be done automatically.

Kindly help me on this.
Revathi
 
Posts: 1
Joined: Tue Mar 21, 2017 6:59 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Question related to TMS tape dataset and vol serial

Postby NicC » Fri Mar 24, 2017 2:56 pm

Is your input dataset not catalogued? If not, why not?

And why use IDCAMS to do a copy? Why not one of the copy utilities - IEBGENER/ICEGENER?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Question related to TMS tape dataset and vol serial

Postby steve-myers » Fri Mar 24, 2017 4:24 pm

Just exactly what do you mean by a "TMS data set"? "TMS" usually refers to the CA1 tape management system, but I fear you mean something else. Next, what do you mean by "which is dynamic"? You must answer both questions before anyone can help you.

NicC asked about the catalog status of the input data set, which prompts two more questions.
  1. Do you know the data set name before you prepare this job? The way you have worded the question seems to me to imply you are getting it from somewhere. Where?
  2. Does the data from which you are deriving the data set name also include the volume serials?
All in all, we now have four questions for you to answer. These answers may raise additional questions for you to answer.

NicC criticized the use of IDCAMS to perform the copy. Now IDCAMS can be a simple method to execute several copy operations in a single z/OS job step, but it has never been regarded as a very efficient data mover.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Question related to TMS tape dataset and vol serial

Postby Robert Sample » Fri Mar 24, 2017 4:26 pm

You MUST use two jobs to do this -- because once the job goes through the converter / interpreter, the JCL CANNOT be changed and hence putting the volume serial in the executing JCL is simply not possible. You may need to write a program in the language of your choice to use the TMS API to retrieve the volume serial and then submit a job through the internal reader using that volume serial.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Question related to TMS tape dataset and vol serial

Postby willy jensen » Sat Mar 25, 2017 2:18 pm

Or one job running a program doing dynamic allocation. REXX springs to mind.
willy jensen
 
Posts: 467
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 70 times

Re: Question related to TMS tape dataset and vol serial

Postby Robert Sample » Mon Mar 27, 2017 3:40 pm

pass that value in a JCL
If the OP is using JCL and not dynamic allocation, two jobs are required.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post