syntax
Referance
%BIN(character-variable-name starting-position length)
The binary built-in function (%BINARY or %BIN) interprets the contents of a specified CL character variable as a signed binary integer. The starting position begins at the position specified and continues for a length of 2 or 4 characters.
Referance
publib.boulder.ibm.com/infocenter/iadthelp/v6r0/
index.jsp?topic=/com.ibm.etools.iseries.pgmgd.doc/evfclmst51.htm
1)THIS COMMAND IS USED FOR CONVERTING X-DECIMAL VALUE TO EQVALENT DEC VALUE
FMT ** ...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7
*************** Beginning of data *************************************
0001.00 PGM
0002.00 DCL VAR(&VAR1) TYPE(*CHAR) LEN(2) VALUE(X'000A')
0003.00 DCL VAR(&VAR2) TYPE(*DEC) LEN(3 0)
0004.00 CHGVAR VAR(&VAR2) VALUE(%BIN(&VAR1))
0005.00 CHGVAR VAR(&VAR1) VALUE(&VAR2)
0006.00 SNDUSRMSG MSG(&VAR1)
0007.00 ENDPGM
****************** End of data ****************************************
OUTPUT
Job 414535/CHVRAMESH/QPADEV0029 changed by JOBMANAGER. 10
No comments:
Post a Comment