You need to pass numeric parameters as hex. Your call will look like...
Call pgm1 (X'0000087F')
The rules with hex values is the last position must end in F. The amount of
positions between the single quotes (including the F) must be an even
amount. For instance, if your parameter was defined as 2,0 and you wanted
to pass the value of 99, the hex value will look like...
X'099F' = 99 for the 2,0 parameter value and an extra 0 to make the amount
of positions between the quotes an even amount.
Hope this helps
Lloyd Bailey
Office: (631) 244-2165
Cell: (631) 445-5344
Fax: (631) 200-6113
                                                                       
             "lwl"                                                     
             <lwl@xxxxxxxxxxxx                                         
             m>                                                         To
             Sent by:                  <midrange-l@xxxxxxxxxxxx>       
             midrange-l-bounce                                          cc
             s@xxxxxxxxxxxx                                            
                                                                   Subject
                                       calling programs with parameters
             09/01/2009 11:04          from the command line           
             AM                                                        
                                                                       
                                                                       
             Please respond to                                         
             Midrange Systems                                          
                 Technical                                             
                Discussion                                             
             <midrange-l@midra                                         
                 nge.com>                                              
                                                                       
                                                                       
To all
As you cal tell from this question I'm new to the 400/iSeries environment.
I want to call a program (pgm1) with one parameter (PRM01) from the command
line.
The parameter is 7,0 in the program and the value I want to pass is 87
I think the command line entry is:
Call pgm1 (0000087)
Obviously this is wrong because the program abends on a data error when I
use the above instruction format.
What should the command line entry look like?
Roy Luce
Systems Plus - Midwest
Direct:  847-540-9635
                        800-913-PLUS (7587)
Cell:      847-910-0884
Email:   rluce@xxxxxxxxxxxxxxxxxxx
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: 
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at 
http://archive.midrange.com/midrange-l.
 
As an Amazon Associate we earn from qualifying purchases.