CL program for measuring tape backup

105 pts.
Tags:
Backup and restore
CL Program
CL programs
Tape Backups
Tarek
i need an example of cl program that reads tape volume and executes the commands in their ok.
ASKED: October 11, 2010  1:47 PM
UPDATED: October 14, 2010  1:37 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 8  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    ...reads tape volume and executes the commands... What should be read from the tape -- labels, headers or files? What "commands" do you want to execute? Please clarify what you want to do. What do you want to accomplish? What business problem are you trying to solve? Tom
    125,585 pointsBadges:
    report
  • as400tarek
    I have schedule CL prograt to take a backup on a daily basis, I need before start yhe backup to check the TAPE labele to verify it, if ok start backup else stop backup
    105 pointsBadges:
    report
  • TomLiotta
    ...to check the TAPE labele to verify it... What are you expecting to find? How will you know if the tape is the right one? I assume that you will supply some value to your CL program. The program should then check the tape volume to see if it matches. But what are you checking? Generally, it is easy to check for the Volume identifier, a name of a File label or the date of a File label. Do you want to check more than that? The CHKTAP command might be easy for you to use. There might be other possibilities if you need more. Describe the values that you will have available. Maybe we can give an example. Tom
    125,585 pointsBadges:
    report
  • pdraebel
    Another command that cold be helpfull is DSPTAPCTG with output to a file. But it all depends on what your situation is.
    2,380 pointsBadges:
    report
  • as400tarek
    dears i need IF statment to check as below the Tape Volume if MIMXBK continue the CL program to backup else dont continue and don't backup CHKTAP DEV(TAP04) VOL(MIMXBK)
    105 pointsBadges:
    report
  • Znason
    What is the reason or need to check the label?
    460 pointsBadges:
    report
  • TomLiotta
    Simplest would possibly be:
    CHKTAP DEV(TAP04) VOL(MIMXBK)
    monmsg ( cpf6700 )  exec( return )
    .../* Backup CL follows here... */...
    The CHKTAP command will throw a CPF6720, CPF67E2 or some related CPF67xx exception if the volume mounted in TAP04 is not MIMXBK. If you don't want to continue, you can simply execute RETURN. After the MONMSG command, the backup will run as long as MONMSG doesn't detect an error signal. You could have it a little better with this:
    CHKTAP DEV(TAP04) VOL(MIMXBK)
    monmsg ( cpf6700 )  exec( do )
       .../* Send messages about the tape error... */...
       return
    enddo
    .../* Backup CL follows here... */...
    By executing a DO-group, the MONMSG lets you code a series of CL commands before the RETURN. Even if you don't put anything in the DO-group other than RETURN, you should code it as a DO-group. That helps you later when you figure out what you want to do when the volume is wrong. The CPF67xx message will be in the joblog anyway. A MONMSG command lets you handle errors at different points in your CL program. If there is no error, the CL continues with the next instruction. If you don't RETURN in the MONMSG code or exit in some other way, the CL will still go to the next command in your program. Tom
    125,585 pointsBadges:
    report
  • as400tarek
    Thanks Tom. it is working now.
    105 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following