Re: Help!--ASCII vs MVS / Unpacked Signed Fields
Posted in 1995
Welcome to the 1960's. You seem to have scoped the extended binary coded decimal problem pretty well. The negative representation of the field ending in zero is probably just a little deeper and doesn't necessarily follow the pattern you saw where you noted that the succession of letters J through R represented negatives 1 through 9, respectively. Why the negative 0 isn't I or S is probably rooted in the punch card which did tricks like putting a space punch above the numbererd rows of the last field to indicate negatives. Just don't limit your test of characters to alphas and you should find one that yields a negative zero. If I had one of my old system 360 green cards I might even be able to give you a clue. If you don't get it from experiment or someone else on this list, write back and I'll try to find it. Good luck -- Con Woodall Colorado St. U.; Veterinary Teach. Hosp.; Ft. Collins CO 80523, USofA; 970-491-1244 FAX 970-491-1205 cwoodall@vth1.vth.colostate.edu "Ask me about my vow of silence!" -- On 12 Sep 1995, Steve Morrow wrote: > Hi People, > > You'll never believe the problem I've encountered now. > > I have an Informix 4gl program which generates a report to a flat > file, which subsequently has to be FTP'd to an MVS box for further > processing. In this file I supply an "amount_charge" field w/ an > implied decimal (ie, $974.00 looks like 00097400). > > My problem is with credit charges...where the amount is a negative > number. The requirements on "the MVS side" call for using a "sign > character" as the last byte, and these characters range from "J" for > 1, to "R" for 9. Thus, if my amount_charge is -$768.81, I would > supply 0007688J. > --------------- STUFF LEFT OUT --------------- > Alas, I thought I could use the ASCII function to assign this char > to a variable and print it (for which it does in the report). However, > after batch processing on MVS, I'm getting $954.07 instead of > $954.00...where did the 7 cents come from????? --------------- STUFF LEFT OUT --------------- > ____ ___ ________ ________ > /_ _] /_ ]/ ______)/ ______) _/| Steve Morrow, Coordinator / DBA > / _/ / / / (____ / /___ _/ | University of South Florida > / _/ / / \\____ ) / _____) _/ | Internet: smorrow@dotrisc.cfr.usf.edu > / _/___/ / ______/ / / / _/ | Voice : (813) 974-6889 > (_________)(________)(___)______/ |______________________________________ >