|
Barbara,
I do agree that there is no obvious need for passing the parameter as alfa.
But I only gave a solution for how it could be solved if you don't have
control
or whises to change the calling or recieving program.
I do a lot of bits and bytes - I'm current in the process of a new version
of
CGIDEV2 that runs not only SBCS or DBCS but full UNICODE (110.000
characters)
in its storage model based on a UTF-8 based model - I don't believe that
this has
been seen before not even in a MS or IBM product because there has always
been
constraints.
On Fri, Jan 25, 2013 at 9:09 PM, Barbara Morris <bmorris@xxxxxxxxxx>wrote:
On 2013/1/25 2:48 PM, Henrik Rützou wrote:
Yes Barara and my first solution to recieve a numeric in a alpha fieldwas
d dsx ds
d dsa 1 5a
d dsn 1 5s 0
dsa = parmfield1;
dsn will then have the value of the original field1
My second in only /free was
[... snip code using bit operations ...]
Do you have a better solution WITHOUT changing the interface ?
_If_ it's necessary for the called program to deal with the parameter as
both alpha and zoned, then I guess the data structure mechanism would be
good, although it probably be better to define the dsx structure as a
template and define the parameter directly as LIKEDS the template
structure.
But I don't see anything in the original post to suggests that the
called program actually needs to use the parameter as alpha.
Wait ... hmmm ... is it "changing the interface" to define the called
program's parameter as zoned rather than alpha? Maybe, from a purist
point of view. But I think it would be sufficient to just have a comment
d mypgm pi
// Note: The caller defines the parmField1 as alpha, but it
// actually contains a zoned value, so defining it as zoned here
D parmField1 5S 0
--
Barbara
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--
Regards,
Henrik Rützou
http://powerEXT.com <http://powerext.com/>
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.