OPS/MVS

 View Only
  • 1.  Rexx to copy PDS to OMVS file

    Posted Mar 17, 2020 07:32 AM
    I can run this under TSO, to copy a PDS member to a OMVS directory:

    "OPUTX" "'USER1.INPUT.DATA80(AAA)'"   '/u/USER1/junkdir/newfile'



    But I need OPS/MVS to do the copy.  If I run above with !OI, says I need a valid ISPF environment.

    I am looking to have a CMD Rule issue a COPY command for me.   Any ideas on how to build this?  Anyone have a sample they currently use?

    Thanks!
    Sal


  • 2.  RE: Rexx to copy PDS to OMVS file

    Broadcom Employee
    Posted Mar 17, 2020 09:20 AM

    Hi Sal,

    Have you considered using OPUT instead of OPUTX? OPUT does not require an ISPF environment.

    Regards,

    Mario



    ------------------------------
    Carlos Mario Silveira Filho
    Principal Support Engineer
    carlosmario.filho@broadcom.com
    Broadcom


    ------------------------------



  • 3.  RE: Rexx to copy PDS to OMVS file

    Posted Mar 17, 2020 09:37 AM
    Mario

    From ISPF 6, this works:
    OPUT 'USER1.INPUT.DATA80(AAA)'  '/u/USER1/junkdir/newfile'

    But when I put in a REXX (even with ADDRESS TSO), I cant run it with a TSO command NOT an !OI
    I get:
    INVALID CURRENT PASSWORD
    RETURN CODE 00000004 RECEIVED DURING PARSING OF THE COMMAND.
    +++ RC(12) +++


    Any ideas of the syntax in a REXX??


  • 4.  RE: Rexx to copy PDS to OMVS file
    Best Answer

    Broadcom Employee
    Posted Mar 17, 2020 10:05 AM

    Hi Sal,

    Use double quotes around the whole OPUT command:

    ADDRESS TSO
    "OPUT 'USER1.INPUT.DATA80(AAA)'  '/u/USER1/junkdir/newfile'"

    Regards,

    Mario




  • 5.  RE: Rexx to copy PDS to OMVS file

    Posted Mar 17, 2020 11:23 AM
    Its always the quotes...   Only combo I didnt try.  Works GREAT.  
    THANK YOU!!