× 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.



On 2013/1/25 2:48 PM, Henrik Rützou wrote:
Yes Barara and my first solution to recieve a numeric in a alpha field was

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




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.