|
Thanks for confirming my method, which made me realize & confess a jugheaded mistake. I was starting %SST at the documented offset (starting at 0) instead of adding 1. -----Original Message----- From: Scott Klement [mailto:midrange-l@xxxxxxxxxxxxxxxx] Sent: Thursday, September 09, 2004 10:16 PM To: Midrange Systems Technical Discussion Subject: Re: CL: BINARY(4) -> DEC? Hi Mike, > What is the proper procedure in CL to convert the BINARY(4) Batch jobs > waiting for messages output from QWCRSSTS to DEC(<len> 0)? I guess it depends on how you've got BINARY(4) fields defined in your CL programs. In V5R2 and earlier, it's usually defined as: DCL VAR(&MYVAR) TYPE(*CHAR) LEN(4) but, in V5R3 there are actual integer data types that you can use instead. Assuming that you want to use the V5R2 and below method, you can do the following: DCL VAR(&MYDEC) TYPE(*DEC) LEN(10 0) DCL VAR(&MYBIN) TYPE(*CHAR) LEN(4) CHGVAR VAR(&MYDEC) VALUE(%BIN(&MYBIN)) -- 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.
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.