+ Reply to Thread
Results 1 to 3 of 3

Thread: Passing parameters

  1. #1

    Default Passing parameters

    Phil, by putting quotes around the whole CMD string, you're preventing the calling CL from replacing the parameters. You have to build up the command string. If I recall correctly, SBMRMTCMD doesn't like you to put expressions, so you'll need a temporary variable to build the command into: DCL &CMD TYPE(*CHAR) LEN(3000) ... chgvar &CMD 'CALL OP_PASS2 PARM(' + *CAT &PWD1 + *CAT &PWD2 + *CAT &PWD3 + *CAT &RTNMSG + *CAT &CORPSYS + *CAT ')' sbmrmtcmd CMD(&CMD) ... If any of the parameters might have more than one word (&RTNMSG?), you might need to add quotes, too: DCL &QUOTE TYPE(*CHAR) LEN(1) VALUE('''') ... chgvar &CMD 'CALL OP_PASS2 PARM(' + *CAT &PWD1 + *CAT &PWD2 + *CAT &PWD3 + *CAT &QUOTE *CAT &RTNMSG *CAT QUOTE + *CAT &CORPSYS + *CAT ')'

  2. #2
    Guest.Visitor Guest

    Default Passing parameters

    Hello, I have a set of CL programs to change QSYSOPR passwords on over 300 remote AS/400. The two CL programs I run on the corporate system read the password from a display screen, runs a query against a file and submit a job to batch. This is where I have the problem passing the parameters. The job the CL submits to batch is the SBMRMTCMD to call the CL at the remote systems and passes the parameters. The remote CL does not like the parameters. Is there a place to get info on how to pass parameters within the SBMRMTCMD command? Any help is appreciated. The CL are copied to

    op_pass.TXT

  3. #3
    Guest.Visitor Guest

    Default Passing parameters

    I would like to know why you add 2 quotes because me I need only one quote before my parameter and one quote after my parameter. My results must be : call REPAGEC parm('password1' 'password2') but with your solution it's give me: parm (''password1''''password2'') Thanks to give me explication.

+ Reply to Thread

Similar Threads

  1. Passing Parameters
    By J.Wells in forum RPG
    Replies: 7
    Last Post: 06-24-2003, 04:00 AM
  2. Passing parameters by VALUE
    By Guest.Visitor in forum CL
    Replies: 1
    Last Post: 01-08-2002, 10:29 AM
  3. Passing S/36E Parameters
    By Guest.Visitor in forum Hardware
    Replies: 4
    Last Post: 09-03-1998, 08:15 PM
  4. passing parameters
    By wjminc in forum Programming
    Replies: 1
    Last Post: 02-27-1998, 07:55 AM
  5. Help Please on Passing Parameters
    By Guest.Visitor in forum Programming
    Replies: 0
    Last Post: 01-01-1995, 02:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts