ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

User Actions in RDI

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

  • User Actions in RDI

    I am trying to create a USER ACTION that, when I select a source file member in remote system explorer, it will copy the selected source member to the IFS. In my user action command for the command, I specify

    CPYTOIMPF FROMFILE(&L/&F &M)..........

    I then get an error message that says "missing substitution variables &ML, &MF, &MM"

    However, when I change the command to
    CPYTOIMPF FROMFILE(&ML/&MF &MM)..........
    RDI tries to use QRSETEMP/QRSESELECT MYLIB for the qualified library/file member name instead of the library/file/member in RSE

    What is the proper way to set up a USER ACTION to execute the CPYTOIMPF on the source file and member I select. I don't know what QRSETEMP and QRSESELECT are

  • #2
    The "Insert variable..." button for Work With User Actions will tell you what the variables mean. ML,MF and MM are temporarily lib, file and member. I don't know why it expects them.

    I threw this together (IBMi 7.3 & RDi 9.6) and it seems to work fine:
    CPYTOIMPF FROMFILE(&L/&F &N) TOSTMF('/tmp/&N.&S') RCDDLM(*CRLF) DTAFMT(*FIXED)

    Comment


    • #3
      I tried using &L/&F &N instead of &ML/&MF &MM and I still got the "missing substitution variables &ML, &MF, &MM" error. I then unchecked the INVOKE ONCE check box and I don't get the error now.
      Now and it works fine with &L/&F &N

      Comment


      • #4
        I've never used Invoke Once. The mouse-over text says:
        Invoke the action once for all selected objects, versus once for each. The name substitution variable holds the quoted full name of each object, delimited by blanks

        That sounds like special handling for multi-select. I know you know can multi-select without it, it just runs your User Action once for each selected item.

        Comment

        Working...
        X