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.
Can Atrium menu option include a parm with program call?
-
- 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:
-
- 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
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.
If you update to the latest version of Atrium, there is a separate field for a parameter that will be passed to the program.
-
- 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
Thanks Scott....that will be very useful!
-
- 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
Hello Scott,
that is very helpful.
But what shall i do if i need more than one parm-value?
that is very helpful.
But what shall i do if i need more than one parm-value?
with kind regards,
Gerd
Gerd
-
- 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
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:
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?
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)
-
- 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
Hi Scott,
thank you, this workaround will help.
thank you, this workaround will help.
with kind regards,
Gerd
Gerd
Who is online
Users browsing this forum: No registered users and 2 guests