You do not have to worry for parsing them out, the CL receives 5 parameters, just declare the variables like you normally do in any CL
This is the CL for the example below
PGM PARM(&P1 &P2 &P3 &P4 &P5)
DCL VAR(&P1) TYPE(*CHAR) LEN(2)
DCL VAR(&P2) TYPE(*CHAR) LEN(2)
DCL VAR(&P3) TYPE(*CHAR) LEN(2)
DCL VAR(&P4) TYPE(*DEC) LEN(5 0)
DCL VAR(&P5) TYPE(*DEC) LEN(4 0)
About the numeric fields, when you pass the parameters in hexadecimal, the length of the parameter must be in even numbers.
Parameter P4 is declared (5,0) when you pass the parameter it must have a length of 6 (letter F included), for example if you want to pass the number 130, you should pass the value X'00130F'
I hope my explanation was clear
________________________________
From: "Regan, Michael" <michael.regan@xxxxxx>
To: 'BPCS ERP System' <bpcs-l@xxxxxxxxxxxx>
Sent: Monday, July 22, 2013 6:48 PM
Subject: Re: [BPCS-L] Passing parameters to options called from BPCS menus
My thanks to all the responders to this thread! I learned more than one thing along the way.
To JG in particular, thanks for the detailed example.
Follow up questions: Does the CL receive 5 parameters (in JG's example -- see below), or is the CL responsible for parsing them out? If individual parameters are received, how are the numeric parameters defined in the CL?
Thanks again!
-----Original Message-----
From: bpcs-l-bounces@xxxxxxxxxxxx [mailto:bpcs-l-bounces@xxxxxxxxxxxx] On Behalf Of JG
Sent: Monday, July 22, 2013 1:33 PM
To: BPCS ERP System
Subject: Re: [BPCS-L] Passing parameters to options called from BPCS menus
You can specify more than 4 parameters, depends of how many parameters your CL will need and the length of the field PARAMETER (256 A).
This is an example of a program that receives 5 parameters, 3 character fields and 2 numeric fields (numeric fields must be specified in hexadecimal format)
Program Parameters
Menu ORD Option 113 Program MYPROG Type D
Parameter
'AB' 'CD' 'EF' X'00120F' X'025F'
F1=Help F3=Exit F5=Refresh F12=Cancel
Hope this helps
Gerardo
________________________________
From: "McGovern, Sean" <Sean.McGovern@xxxxxxxxxxxx>
To: BPCS ERP System <bpcs-l@xxxxxxxxxxxx>
Sent: Thursday, July 18, 2013 8:14 AM
Subject: Re: [BPCS-L] Passing parameters to options called from BPCS menus
The help text states: -
"Specify the values to use to call a program."
I've just tested it with 2 (character) parameters and it was fine.
Maybe difficult with numeric parameters (haven't tested).
-----Original Message-----
From: bpcs-l-bounces@xxxxxxxxxxxx [mailto:bpcs-l-bounces@xxxxxxxxxxxx] On Behalf Of Molyneux, Tom
Sent: 18 July 2013 13:12
To: BPCS ERP System
Subject: Re: [BPCS-L] Passing parameters to options called from BPCS menus
Thanks Sean. The heading is "Parameter" (Singular) - I never realised it could be used as more than 1! Next time I have something that requires more than 1 I'll try it.
Tom Molyneux
NOV Mono
MIS Department
Tel. +44 (161) 214 2142
Fax. +44 (161) 214 2344
E:mail Tom.Molyneux@xxxxxxx
-----Original Message-----
From: bpcs-l-bounces@xxxxxxxxxxxx [mailto:bpcs-l-bounces@xxxxxxxxxxxx] On Behalf Of McGovern, Sean
Sent: 18 July 2013 13:08
To: BPCS ERP System
Subject: Re: [BPCS-L] Passing parameters to options called from BPCS menus
You can pass in up to 4 parameters using this method.
-----Original Message-----
From: bpcs-l-bounces@xxxxxxxxxxxx [mailto:bpcs-l-bounces@xxxxxxxxxxxx] On Behalf Of Molyneux, Tom
Sent: 18 July 2013 12:26
To: BPCS ERP System
Subject: Re: [BPCS-L] Passing parameters to options called from BPCS menus
Michael,
We are on ERP Lx V8.3.2
I know you can call a program from a BPCS menu with one fixed parameter. We have several options like this that we have added to menus. But, unless I'm missing something, I think it is restricted to one parameter.
To do this, in menu maintenance position the cursor on the program to be called and take F4 and you'll get another screen where you can define the parameter to be passed to the calling program. Eg. We have a number of options to maintain selected Tables on ZCC without giving the user the entire SYS105 option. We pass the different CCTABL field names to the program for each option where it is called.
If you need 2 parameters, you could concatenate them into one, called from the menu, and have your CL spilt them into 2 at start of processing.
Hope that helps
Tom Molyneux
NOV Mono
MIS Department
Tel. +44 (161) 214 2142
Fax. +44 (161) 214 2344
E:mail Tom.Molyneux@xxxxxxx
-----Original Message-----
From: bpcs-l-bounces@xxxxxxxxxxxx [mailto:bpcs-l-bounces@xxxxxxxxxxxx] On Behalf Of Regan, Michael
Sent: 16 July 2013 20:40
To: 'bpcs-l@xxxxxxxxxxxx'
Subject: [BPCS-L] Passing parameters to options called from BPCS menus
I have a CLLE program that accepts two parameters.
Is there a way to call the program from a BPCS menu option, passing the parameters (which will always be the same when called from the menu)?
Or do I have to create a wrapper program with no parms, and call that?
--
This is the BPCS ERP System (BPCS-L) mailing list To post a message email: BPCS-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/bpcs-l
or email: BPCS-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/bpcs-l.
________________________________
Mono Pumps Limited
Registered in England No. 300721.
Registered Office : Martin Street, Audenshaw, Manchester. M34 5JA
--
This is the BPCS ERP System (BPCS-L) mailing list To post a message email: BPCS-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/bpcs-l
or email: BPCS-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/bpcs-l.
--
This is the BPCS ERP System (BPCS-L) mailing list To post a message email: BPCS-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/bpcs-l
or email: BPCS-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/bpcs-l.
________________________________
Mono Pumps Limited
Registered in England No. 300721.
Registered Office : Martin Street, Audenshaw, Manchester. M34 5JA
--
This is the BPCS ERP System (BPCS-L) mailing list To post a message email: BPCS-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/bpcs-l
or email: BPCS-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/bpcs-l.
As an Amazon Associate we earn from qualifying purchases.