Automated Testing

Automated Testing

Automated Testing

Build an automated testing process to enable continuous integration of your hybrid cloud applications including z/OS

 View Only
  • 1.  How to create a Tape volume in linux for RD&T

    Posted Wed March 30, 2016 02:10 AM

    Dear All,

     

    Can you let me know how to create a AWSTAPE volume in Linux for RD&T.

    I am able to create a tape file(eg. TEST01.awstape), but I need to create a tape volume to mount on the drive in the DEVMAP.

    Can anyone pls guide.

     

    Thanks

    Guru

    gurudevr


  • 2.  Re: How to create a Tape volume in linux for RD&T

    Posted Wed March 30, 2016 02:39 PM

    I am by no means a tape expert..... but in the previous append you were more specific by asking this question:

     "$ scsi2tape /dev/st0 /z/my/TAPE23" how to create this TAPE23. Is there any command used to create that tape entry in Linux?"

     

    I believe the scsi2tape command does create a Linux file named TAPE23 in awstape format. In other words, it takes the tape in the scsi adapter defined for the Linux image at /dev/st0/ , copies the contents of that tape volume, converts it to the AWSTAPE format, then stores it as file name TAPE23 in the /z/my directory. This assumes you have a "physical" tape already, and are just looking to get it into the awstape format, which is a format much easier/quicker for zPDT to use.

     

    If the question is how you do create a tape volume in awstape format without an existing tape volume,  the answer is you simply define an awstape manager stanza, something like this:

    [manager]
    name awstape AB00 [--maxlength=1000m] [--compress]
    device 560 3490 3490
    device 561 3490 3490 /local/my.tape.vol.111111

    my.tape.vol111111 does not have to exist. The Redbook says it like this: "The awstape volumes are created when they are written; that is, it is not necessary to create or initialize the volume before writing to it." Any z/OS job or application that writes to device 561 writes assuming it is writing to a tape volume on a tape drive. In reality, zPDT will write to that Linux file name my.tape.vol111111 in awstape format, and thus "create" the emulated tape volume, and append to it as more records are written. 

     

    That is at least my understanding. Hope this helps.

     

         Bebe

     

     

     

     

     

    RDTBebe


  • 3.  Re: How to create a Tape volume in linux for RD&T

    Posted Thu March 31, 2016 01:59 AM

    Dear Bebe,

     

    You are right, the second part was the answer I was looking for. I have mentioned like below in my Devmaps

     

    [manager]

    name awstape AB00 [--maxlength=1000m][--compress]

    device 581 3490 3490 /usr/111119                  

     

    The above went through fine, I was able to make the drive online. my question is, I am not able to see this Tape 111119 in the tape drive 581. I believe 111119 acts like a premounted volume, than why is it not showing in the display command against the device.

     

    UNIT TYPE STATUS        VOLSER     VOLSTATE   
    0581 3490 O    -R                                  /REMOV

     

    Thanks

    Guru

     

    gurudevr


  • 4.  Re: How to create a Tape volume in linux for RD&T

    Posted Thu March 31, 2016 07:18 PM

    While in some ways an emulated tape acts like a pre-mounted volume, it appears in some ways it does not. I replicated your exact situation. I defined an awstape stanza with a file that currently does not exist. As in your situation, the display u command showed the tape drive online and ready. I then submitted an iebcopy job that unloaded a partitioned dataset and wrote it to dataset sequence number 1 on the emulated tape drive (580). I have included that iebcopy job below for reference.

     

    MVS prompted me to mount the tape to the device as follows:

    M 0580,PRIVAT,SL,TAPECP1,TAPECP2,TAPETST5

    This surprised me, as I like you thought just defining the awstape was the equivalent of having an "already mounted" volume. But at least for me, it did not work that way.

     

    I thought maybe that just issuing a 'ready 580' command from the Linux Terminal would make the device ready, since I had already indicated the awstape file in the devmap. However, when I did this my IEBCOPY job completed with errors.

     

    So I unmounted the tape using awsmount -u, resubmitted the IEBCOPY job, but this time when prompted with the mount message from MVS I entered:

    awsmount -m /home/ibmsys1/tapetst5       -  this was the same file I had specified in my devmap.

     

    This worked for me. I got prompted from MVS to enter the label information for the tape volume as follows:

    *01 IEC704A REPLY 'VOLSER,OWNER INFORMATION' OR 'M'

    I entered - R 01,'111111,BEBE'   - which set the volume serial number for the tape to 111111

    The job completed as follows:

    IEE600I REPLY TO 01 IS;'111111,BEBE'

    IEC705I TAPE ON 0580,111111,SL,COMP,TAPECP1,TAPECP2,TAPETST5,MEDIA0

    IEC205I SYSUT2,TAPECP1,TAPECP2,FILESEQ=1, COMPLETE VOLUME LIST, 199

    DSN=TAPETST5,VOLS=111111,TOTALBLOCKS=7

     

    I will note that if I did a display on unit 580 at this point, after the IEBCOPY job completed, I got not ready - when the job completes, it apparently automatically unmounts. By issuing a 'ready 580' command, the device became online and ready again, and I could resubmit the job. I would again be prompted for the mount, could perform the awsmount, and all would work. Also at this point, I was able to change the IEBCOPY job to put the VOL=SER=111111 parameter on the DD statement for my tape drive, I could change the sequence number to 2 in the LABEL parameter, and write a second file on to the same tape volume..

     

    I don't know why I am prompted for a mount from MVS, but I am. I also tried doing the awsmount before the IEBCOPY, but that did not work either. I still got the mount message from MVS when I submitted the IEBCOPY, and a simple ready command did not work; I had to do another awsmount in response to the Mount prompt to get the job to work. I think the key is that the device is ready at the point you define it with the awstape stanza, but you must issue an awsmount command when the job you execute is ready to write to tape.

     

    I hope this helps.

          Bebe

     

    Sample IEBCOPY job

    //TAPECP1  JOB (ACCT),CLASS=A,MSGCLASS=H,NOTIFY=&SYSUID
    //TAPECP2  EXEC PGM=IEBCOPY,REGION=0M,TIME=1440
    //SYSUT1   DD DISP=SHR,DSN=BEEB.SYSPLEX.TCPPARMS,UNIT=3390,
    //            VOL=SER=USER01
    //SYSUT2   DD DSNAME=TAPETST5,UNIT=580,
    //            DISP=(NEW,KEEP),LABEL=(1,SL)
    //SYSUT3   DD DSNAME=TEMP1,UNIT=3390,VOL=SER=USER01,
    //            DISP=(NEW,DELETE),SPACE=(80,(60,45))
    //SYSPRINT DD SYSOUT=A
    //SYSIN    DD DUMMY
    //*

     

     

     

     

    .

     

     

     

     

    RDTBebe


  • 5.  Re: How to create a Tape volume in linux for RD&T

    Posted Fri April 01, 2016 08:07 AM

    Dear Bebe,

    You were bang on, your steps helped me a lot. I as able to read back from Tape as well.

    " awsmount -m /home/ibmsys1/tapetst5" --> This dint work for me, it was throwing error.

    "awsmount -m tapetst5" --> This worked for me ( file got saved in default directory )

     

    Thanks a lot for your help Bebe, it was good learning experience for me :)

    Guru

     

     

     

      

    gurudevr