Topic
  • 7 replies
  • Latest Post - ‏2012-09-04T23:00:10Z by barbara_morris
scjt2001
scjt2001
18 Posts

Pinned topic UIM list Panels (List Action Problem)

‏2012-09-04T15:17:17Z |
I have written a UIM list panel simulating WRKMBRPDM. In the panel I have created conditions based on the source attribute and added multiple option 14 to compile different types of source based on the above conditions. But the problem is It does not pick the correct compile command when i use option 14, it does pick it correctly on the next try. what i found is it uses the condition of the last selected option for the next option.

I have attached the source
Updated on 2012-09-04T23:00:10Z at 2012-09-04T23:00:10Z by barbara_morris
  • scjt2001
    scjt2001
    18 Posts

    Re: UIM list Panels (List Action Problem)

    ‏2012-09-04T15:24:28Z  
    attached is correct source
  • barbara_morris
    barbara_morris
    389 Posts

    Re: UIM list Panels (List Action Problem)

    ‏2012-09-04T16:53:05Z  
    • scjt2001
    • ‏2012-09-04T15:24:28Z
    attached is correct source
    I don't know how to open your attachment. It looks like a .rar file is like a zip file, but my version of winzip won't open it.

    Perhaps you can just attach simple .txt files instead.
  • tcj2001
    tcj2001
    7 Posts

    Re: UIM list Panels (List Action Problem)

    ‏2012-09-04T17:32:42Z  
    I don't know how to open your attachment. It looks like a .rar file is like a zip file, but my version of winzip won't open it.

    Perhaps you can just attach simple .txt files instead.
    I am not able to upload multiple files, there is limit of only one attachment. I have now uploaded a zip version of it.
  • tcj2001
    tcj2001
    7 Posts

    Re: UIM list Panels (List Action Problem)

    ‏2012-09-04T17:43:02Z  
    • tcj2001
    • ‏2012-09-04T17:32:42Z
    I am not able to upload multiple files, there is limit of only one attachment. I have now uploaded a zip version of it.
    To load the data in the panel list, i am making use of 2 file FDMBRLPF and PGMREFPF in WRKMEMPD1R.SQLRPGLE

    DSPFD FILE(*ALLUSR/*ALL) TYPE(*MBRLIST) +
    OUTPUT(*OUTFILE) FILEATR(*PF *LF) +
    OUTFILE(QGPL/FDMBRLPF)

    DSPPGMREF PGM(*ALLUSR/*ALL) OUTPUT(*OUTFILE) +
    OBJTYPE(*ALL) OUTFILE(QGPL/PGMREFPF)
  • barbara_morris
    barbara_morris
    389 Posts

    Re: UIM list Panels (List Action Problem)

    ‏2012-09-04T18:52:19Z  
    • tcj2001
    • ‏2012-09-04T17:43:02Z
    To load the data in the panel list, i am making use of 2 file FDMBRLPF and PGMREFPF in WRKMEMPD1R.SQLRPGLE

    DSPFD FILE(*ALLUSR/*ALL) TYPE(*MBRLIST) +
    OUTPUT(*OUTFILE) FILEATR(*PF *LF) +
    OUTFILE(QGPL/FDMBRLPF)

    DSPPGMREF PGM(*ALLUSR/*ALL) OUTPUT(*OUTFILE) +
    OBJTYPE(*ALL) OUTFILE(QGPL/PGMREFPF)
    Is it possible for you to create a version of your program(s) with only the minimum amount of code to demonstrate the problem? There is far too much code (for me) to read through to try and understand what's going on, and the code you have provided isn't complete or correct so we can't build it to try it for ourselves. (For example, some copy files and bnddirs are missing, the utility.sqlrpgle.txt source has multiple prototypes with the same name, and both WRKMEMPDMR and WRKMEMPD2R seem to be for the same program.)

    I can't guarantee that I'll have time to look at it even if you give us a trimmed-down and/or complete version, but someone else who is following this forum might have time.

    As an aside, I don't think it's a good idea to have two separate prototypes for the same program. It looks like you are using the name MAIN or WRKMAIN for the prototype of the main procedure in every program, which forces you to create a different prototype when you want to call the programs from another program. I think it's better to use the same name for the prototype everywhere, and to put the prototype in a copy file if the program is going to be called from another RPG program. So the main procedure in WRKMEMPD1R would always be called BuildList; it would not be called MAIN or WRKMAIN within the program itself.
  • tcj2001
    tcj2001
    7 Posts

    Re: UIM list Panels (List Action Problem)

    ‏2012-09-04T20:03:05Z  
    Is it possible for you to create a version of your program(s) with only the minimum amount of code to demonstrate the problem? There is far too much code (for me) to read through to try and understand what's going on, and the code you have provided isn't complete or correct so we can't build it to try it for ourselves. (For example, some copy files and bnddirs are missing, the utility.sqlrpgle.txt source has multiple prototypes with the same name, and both WRKMEMPDMR and WRKMEMPD2R seem to be for the same program.)

    I can't guarantee that I'll have time to look at it even if you give us a trimmed-down and/or complete version, but someone else who is following this forum might have time.

    As an aside, I don't think it's a good idea to have two separate prototypes for the same program. It looks like you are using the name MAIN or WRKMAIN for the prototype of the main procedure in every program, which forces you to create a different prototype when you want to call the programs from another program. I think it's better to use the same name for the prototype everywhere, and to put the prototype in a copy file if the program is going to be called from another RPG program. So the main procedure in WRKMEMPD1R would always be called BuildList; it would not be called MAIN or WRKMAIN within the program itself.
    Here is a simplified version

    run this command to create file FDMBRLPF
    DSPFD FILE(*ALLUSR/*ALL) TYPE(*MBRLIST) +
    OUTPUT(*OUTFILE) FILEATR(*PF *LF) +
    OUTFILE(QGPL/FDMBRLPF)

    Compile WRKXXXPDMP (PNLGRP)
    compile WRKXXXPDMR (SQLRPGLE)

    Call WRKXXXPDMR
  • barbara_morris
    barbara_morris
    389 Posts

    Re: UIM list Panels (List Action Problem)

    ‏2012-09-04T23:00:10Z  
    • tcj2001
    • ‏2012-09-04T20:03:05Z
    Here is a simplified version

    run this command to create file FDMBRLPF
    DSPFD FILE(*ALLUSR/*ALL) TYPE(*MBRLIST) +
    OUTPUT(*OUTFILE) FILEATR(*PF *LF) +
    OUTFILE(QGPL/FDMBRLPF)

    Compile WRKXXXPDMP (PNLGRP)
    compile WRKXXXPDMR (SQLRPGLE)

    Call WRKXXXPDMR
    Thanks, that works great. I see what you mean. And I notice that once I've tried to use 14 on a type that won't compile, like TXT, it won't correct itself when I pick a compile-able type.

    I was assuming that your code would be in control for selecting what to do, but it looks like the panel group handles everything. (I don't know anything about panel groups beyond the simple help kind.)

    Since this isn't really an RPG issue, you might be better off posting your question to the more general IBM i forum here: http://www.ibm.com/developerworks/forums/forum.jspa?forumID=2675