|
That did it! The vary(*YES *INT2) was putting some extra info at the
beginning of my file parm, so I took it out, and it works like a charm.
Thanks for all your help.
Mike E.
Barbara Morris
<bmorris@ca.ibm.c To: rpg400-l@midrange.com
om> cc:
Sent by: Subject: Re: Prototyping and
Creating integer objects in RPG
rpg400-l-admin@mi forcallingJavaclasses
drange.com
11/22/02 01:37 PM
Please respond to
rpg400-l
meovino=/SPx079MrvAgMxX8nMqP6gC/G2K4zDHf@public.gmane.org wrote:
>
> If I define file_in as
>
> D file_in S 255A Varying
>
> I get a "Length of varying length variable is out of range" error. If I
> look at the dump, it tells me that file_in is 257 characters long.
>
Oops, I only addressed the numeric problem in my previous message.
You can't pass a 255-VARYING field parameter using command line CALL.
(Well, you can, but you'd have to code 257 hex characters and you don't
want to do that.)
If you really want to call this from the command line, write a CMD.
CMD prompt('whatever this program does')
PARM kwd(file) type(*char) len(255) vary(*YES *INT2) prompt('The file')
PARM kwd(format) type(*int4) prompt('The format')
===> CRTCMD yourlib/filething pgm(*libl/ICR001) prdlib(yourlib)
then
===> filething file('/JavaUtil/ImageConversion/in') format(13)
or
===> filething '/JavaUtil/ImageConversion/in' 13
or if you get fancy with SPCVAL for the second parm
===> filething '/JavaUtil/ImageConversion/in' *something
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.