Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2010
    Posts
    3

    Default Retrieving optional parameters using RPG

    Hi,

    As part of an option definition I have 'Optional Parameters' set to 'operation=A&currentRequestNumber=1'.

    Within the RPG program I am trying to get these parameter values but without any success.

    p getPostData b
    d pi
    /free

    @operation = vvIn_char('operation');
    @request = vvIn_num('currentRequestNumber');
    @operation2 = vvIn_char('OPERATION');
    @request2 = vvIn_num('CURRENTREQUESTNUMBER');

    DUMP;

    /end-free
    p e

    The javasript is calling this program (as I am getting a dump).
    Javascript snippet:

    function loadParms(){

    Ext.Ajax.request({
    url: 'vvcall.pgm',
    params: {
    pgm: 'PRW020',
    action: 'GetOptParms'
    },
    success: function(response){
    var check = response.responseText;
    if (check) {
    var data = Ext.util.JSON.decode(response.responseText);
    if (data.SUCCESS == '1') {
    alert('operation: ' + data.OP);
    alert('currentRequestNumber: ' + data.CRN);
    actionController(nextAction);
    //helloWorld(data.PARM1, data.PARM2);
    }
    }
    },
    failure: function(response){
    Ext.Msg.alert('Could not get startup values');
    }
    });
    }

  2. #2
    Join Date
    Jun 2008
    Location
    Chicago
    Posts
    641

    Default

    I cannot see anywhere in your code where you are passing these parameters. Please post the relevant front-end code where you are passing them. Note: when posting code....wrap it in the
    Code:
    here is code
    tags.

  3. #3

    Default

    Ok, if you're putting the extra parms in as part of the option definition then they should be coming through with the code you have. Can you let us know what version of Valence you're running? Just log into the portal and click the About link in the upper right and you'll see the full version.
    Richard
    CNX Development Team
    richard.milone@cnxcorp.com

  4. #4
    Join Date
    Feb 2010
    Posts
    3

    Default Valence Web Application Framework

    Hi,

    It is version 2.1.20100409.0

Bookmarks

Posting Permissions

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