I would guess it's the old Packed(15,5) default for numeric parameters biting
him.
Call myPgm parm(37 'Pickles')
Passes the number 37 as a packed decimal value whose attributes are 15-digits
long with 5 decimals, or X'000000003700000F'
No way to change the default.
A work around has been described, (specify X'037F' for a packed(3,0) value).
Another work around is to create a command definition object for the program,
and specify TYPE(*DEC) Len(3 0) for the parameter. But then to make it work, you
have to use the command definition instead of the calling the program directly.
-Bob Cozzi
www.i5PodCast.com
Ask your manager to watch i5 TV
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [
mailto:rpg400-l-bounces@xxxxxxxxxxxx] On
Behalf Of rob@xxxxxxxxx
Sent: Tuesday, May 15, 2007 10:23 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: Packed decimal parameters
Josh,
What ARE you trying to do? Submit a job or call a program or what? On a
straight call, people use packed data as parameters all the time - no
problem. SBMJOB is where you run into problems. And someone already
posted the FAQ on that. Read that - it is golden. I STRONGLY suggest the
command interface as a solution. At one time someone documented a
technique to take a CLP source member, and by some strategic copying and
pasting copy and convert it to a CMD member.
I forget who this genius was but here's the link:
http://faq.midrange.com/data/cache/576.html
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.