|
Okay, I have to ask.using
But before I ask, a couple of definitions:
Bytes are 8 bits, nibbles are half a byte or 4 bits.
Packed fields use consecutive nibbles to store values
Unpacked fields use consecutive bytes to store values
So the question is: if the RPG program declares a parameter as 7,0 field
does that mean it is automatically a packed field and, by definition,
consecutive nibbles to store the value?of
Roy Luce
Systems Plus - Midwest
Direct: 847-540-9635
800-913-PLUS (7587)
Cell: 847-910-0884
Email: rluce@xxxxxxxxxxxxxxxxxxx
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Lloyd Bailey
Sent: Tuesday, September 01, 2009 10:22 AM
To: Midrange Systems Technical Discussion
Subject: Re: calling programs with parameters from the command line
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
positions between the single quotes (including the F) must be an evento
amount. For instance, if your parameter was defined as 2,0 and you wanted
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>
command
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
line.list
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
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.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.