× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks Bob and Tyler, I will look into the defining a command.

Josh

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Bob Cozzi
Sent: Tuesday, May 15, 2007 8:31 AM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: Packed decimal parameters


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.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.