|
But if I am not mistaken you cannot use an edtcde with type S correct? On Thu, 02 Mar 2006 10:28:42 -0600, Rich Duzenbury wrote > On Thu, 2006-03-02 at 06:56 -0800, Douglas W. Palme wrote: > > One thing I just figured out is that when entering a negative number it > > seems I have to enter it as 32- and then field exit otherwise it ignores > > the "-" > > > > So entering -32 does not work > > > > Anyone else ever see this? > > This is how 5250 works. A positive number is made with 'field exit' > or 'field +'. A negative number is made with 'field -'. > > Note that if you eval a_char_field = %char(a_numeric_field), and the > numeric field is negative, the minus sign is the leading character. > > A numeric S type field is probably the best for data entry. > > Test code for the various numeric shifts (D/N/S/Y) follows. It is > instructive to run the program and key 1 followed by field minus in each > field. > > zz3000d, dspf > A CA03(03 'Exit') > A R DSP01 > A NUM0 5D 0B 2 2 > A NUM1 5N 0B 3 2 > A NUM2 5S 0B 4 2 > A NUM3 5Y 0B 5 2 > A MSG 60A 7 2 > > zz3000r, rpgle > Fzz3000d cf e workstn > /free > dow *in03 = *off; > exfmt dsp01; > msg = %char(num0) + ' ' + %char(num1) + ' ' + > %char(num2) + ' ' + %char(num3); > enddo; > *inlr = *on; > /end-free > > The only one that seems sane for negative numbers is S. > > Regards, > Rich > > -- > This is the Midrange Systems Technical Discussion (MIDRANGE-L) > mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To > subscribe, unsubscribe, or change list options, visit: > http://lists.midrange.com/mailman/listinfo/midrange-l or email: > MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment > to review the archives at http://archive.midrange.com/midrange-l. If you bought it, it was hauled by a truck - somewhere, sometime.
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.