Can Atrium menu option include a parm with program call?

Use this board to ask questions or have discussions with other Atrium users.
Post Reply
ppbedz
Experienced User
Posts: 147
Joined: Tue Jun 17, 2014 4:00 pm
First Name: Patti
Last Name: Bednarz
Company Name: McGard
State / Province: New York
Country: United States
Contact:

Can Atrium menu option include a parm with program call?

Post by ppbedz »

I am setting up a menu option in Atrium and would like to pass a parameter to the program it is calling. I tried to set it up as follows and it does not seem to pass anything even though the program still executes. Is this syntax even valid, or is there another way to pass a parm? Thank you.
parmexample.docx
(36 KiB) Downloaded 301 times
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Can Atrium menu option include a parm with program call

Post by Scott Klement »

That syntax is not valid. That field is for the program name, so in your example, it thinks that you have a progam named "reqshtc2t parm('MNT')". It thinks the whole string is part of the program name -- but since a program name can't be longer than 10 characters -- and by chance, the 'parm' starts in the 11th character, so it gets "chopped off".

If you update to the latest version of Atrium, there is a separate field for a parameter that will be passed to the program.
ppbedz
Experienced User
Posts: 147
Joined: Tue Jun 17, 2014 4:00 pm
First Name: Patti
Last Name: Bednarz
Company Name: McGard
State / Province: New York
Country: United States
Contact:

Re: Can Atrium menu option include a parm with program call

Post by ppbedz »

Thanks Scott....that will be very useful!
Gerd
New User
Posts: 11
Joined: Thu Sep 12, 2013 6:33 am
First Name: Gerd
Last Name: Kiefer
Company Name: VSB Bauer Software GmbH
State / Province: Outside Canada/USA
Country: Germany
Contact:

Re: Can Atrium menu option include a parm with program call

Post by Gerd »

Hello Scott,

that is very helpful.
But what shall i do if i need more than one parm-value?
with kind regards,

Gerd
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Can Atrium menu option include a parm with program call

Post by Scott Klement »

Atrium currently supports only one parameter. However, it's a rather large parameter (up to 250 characters) so you could potentially put multiple values in that parameter if you need to.

For example, you could have a CL program like this:

Code: Select all

PGM PARM(&BIGPARM)

      DCL VAR(&PARM1) TYPE(*CHAR) LEN(10)
      DCL VAR(&PARM2) TYPE(*CHAR) LEN(10)
      DCL VAR(&BIGPARM) TYPE(*CHAR) LEN(250)

      CHGVAR VAR(&PARM1) VALUE(%SST(&BIGPARM 1 10))
      CHGVAR VAR(&PARM2) VALUE(%SST(&BIGPARM 11 20))

     CALL MYPGM PARM(&PARM1 &PARM2)
So this would allow you to pass data from Atrium all in one big parameter, and then split it up into multiple parameters when calling your RPG program. Does that help you at all?
Gerd
New User
Posts: 11
Joined: Thu Sep 12, 2013 6:33 am
First Name: Gerd
Last Name: Kiefer
Company Name: VSB Bauer Software GmbH
State / Province: Outside Canada/USA
Country: Germany
Contact:

Re: Can Atrium menu option include a parm with program call

Post by Gerd »

Hi Scott,

thank you, this workaround will help.
with kind regards,

Gerd
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest