|
Gerry wondered: >Is there any references in IBM manuals >to cvthc? I've checked the ILE C for >AS/400 Run-Time Reference but can't find it. I fired up the V5R1 Infocentre, did a search on CVTHC and came up with it straight away: The MI Library Reference. http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/QBJADR00/1.25 Some might think this is too "whiz bang" for RPG. I don't have a recent RPG only example: E ARB 4 1 E ARC 4 1 E TABBIT 1 16 4 TABCHR 1 C TESTSR BEGSR C MOVEA'00000000'*IN,40 C TESTB'0' ARA,X 40 C TESTB'1' ARA,X 41 C TESTB'2' ARA,X 42 C TESTB'3' ARA,X 43 C TESTB'4' ARA,X 44 C TESTB'5' ARA,X 45 C TESTB'6' ARA,X 46 C TESTB'7' ARA,X 47 C* UPPER FOUR BYTES C MOVEL*ZEROS ARB C *IN40 IFEQ '1' C MOVE '1' ARB,1 C END C *IN41 IFEQ '1' C MOVE '1' ARB,2 C END C *IN42 IFEQ '1' C MOVE '1' ARB,3 C END C *IN43 IFEQ '1' C MOVE '1' ARB,4 C END C MOVEAARB CHECK 4 C CHECK LOKUPTABBIT TABCHR 99 C *IN99 IFEQ '1' C MOVELTABCHR UPPER 1 C ELSE C MOVEL'#' UPPER C END C* LOWER 4 BYTES C MOVEL*ZEROS ARC C *IN44 IFEQ '1' C MOVE '1' ARC,1 C END C *IN45 IFEQ '1' C MOVE '1' ARC,2 C END C *IN46 IFEQ '1' C MOVE '1' ARC,3 C END C *IN47 IFEQ '1' C MOVE '1' ARC,4 C END C MOVEAARC CHECK 4 C CHECK LOKUPTABBIT TABCHR 99 C *IN99 IFEQ '1' C MOVELTABCHR LOWER 1 C ELSE C MOVEL'#' LOWER C END C ENDSR ** 00000 00011 00102 00113 01004 01015 01106 01117 10008 10019 10100 - note these are invalid and set to zero 10110 11000 11010 11100 11110
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.