ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Selective Tape restore sequence CL & Sending *DTAARA ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Selective Tape restore sequence CL & Sending *DTAARA ?

    Hello,

    Usually Every month there's a process where in my place we need to do an end of day simulation run in a DRC site, which means a tape containing a save file of some library will be sent from the DC to the DRC. I already made a SAVSAVFDTA CL in the DC which upon runs saves a specific save file into the tape, but sometimes the tape already have other savf in it which makes the sequence in the tape not always the same. And the tape device too not always the same (sometimes TAP01, TAP02, yp to TAP07).

    Are there any way to make a CL that contains a menu or some sort ? so that when i run the CL in order to do an RSTOBJ of the tape it will lets me choose which tape it will be and which sequence it will use ?

    And also is it possible to send (FTP to remote machine) a DTAARA using CL ?

    Thanks

  • #2
    Your question about selecting which tape, etc. doesn't make a lot of sense, given that the RSTOBJ command itself forces those choices.

    As for the sequence number - use the output of the save command to see what sequence number was used.

    Cheers,

    Emmanuel

    Comment


    • #3
      Originally posted by EmmanuelW1 View Post
      Your question about selecting which tape, etc. doesn't make a lot of sense, given that the RSTOBJ command itself forces those choices.

      As for the sequence number - use the output of the save command to see what sequence number was used.

      Cheers,

      Emmanuel
      So it is not possible to make a CL that appears in a form of Go Menu or some sort ? So that when the CL is being called a menu or some sort will pops up ?

      Thanks

      Comment


      • #4
        If all you want to do is to see only the pertinent parameters on the RSTOBJ command, then you could put together a simple program that would selectively prompt the RSTOBJ command. Put two question marks (??) before any keyword that you want to display and be able to change. Put a question mark and an asterisk (?*) before any keyword that you want to have displayed but not be able to change. Any keywords that have nothing in front of them will not be displayed and will use the value that you supply on the command.
        Code:
        PGM
                        RSTOBJ   ??OBJ(*ALL) ??SAVLIB(*N) ??DEV(TAP01) ??SEQNBR(1)
                        MONMSG   MSGID(CPF6801)
        ENDPGM
        As to the FTP using CL question, it's not possible to directly FTP a data area. You would have to save it to a save file, FTP the save file, and restore it from the save file on the target machine.

        Comment


        • #5
          Originally posted by Brian Rusch View Post
          If all you want to do is to see only the pertinent parameters on the RSTOBJ command, then you could put together a simple program that would selectively prompt the RSTOBJ command. Put two question marks (??) before any keyword that you want to display and be able to change. Put a question mark and an asterisk (?*) before any keyword that you want to have displayed but not be able to change. Any keywords that have nothing in front of them will not be displayed and will use the value that you supply on the command.
          Code:
          PGM
          RSTOBJ ??OBJ(*ALL) ??SAVLIB(*N) ??DEV(TAP01) ??SEQNBR(1)
          MONMSG MSGID(CPF6801)
          ENDPGM
          As to the FTP using CL question, it's not possible to directly FTP a data area. You would have to save it to a save file, FTP the save file, and restore it from the save file on the target machine.
          Hello,

          I tried using this format while using SBMJOB and it seems that it is unable to be done because a notice of automative or selective object prompting not allowed, are there any way to go around this ? Since usually the operation is being done while using SBMJOB not running interactively

          Thanks

          Comment


          • #6
            You didn't indicate that you wanted to submit the command to a batch job. In that case, use the QCMDCHK API to prompt the command and store it in a variable to be used on the SBMJOB command (make sure the variable is big enough to store the entire command string):
            Code:
            PGM
                            DCL      VAR(&CMD) TYPE(*CHAR) LEN(1000)
                            CHGVAR   VAR(&CMD) VALUE('RSTOBJ ??OBJ(*ALL) ??SAVLIB(*N) ??DEV(TAP01) ??SEQNBR(1)')
                            CALL     PGM(QCMDCHK) PARM(&CMD 1000)
                            MONMSG   MSGID(CPF6801) EXEC(RETURN)
            
                            SBMJOB   CMD(&CMD) JOB(job_name) 
            ENDPGM

            Comment

            Working...
            X