ca.portal.admin

Re: PRINT PAGE on a page number in hex

Discussion created by ca.portal.admin on May 23, 2005
Steve - I use this clist: I can cut and paste the offending DBKEY from
the
deadlock message in OLP into this TSO line command - then paste the
result
into PRINT PAGE: tso hextodec pppp:ll It works without a line number
too.

Perhaps not elegant but it does a job for me - cheers - Gary


PROC 1 HEX
CONTROL NOMSG NOLIST ASIS
WRITE -----> HEXTODEC <------ HEX Value=&HEX
/*--------------------------------------------------------------------*/
/* */
/* */
/*--------------------------------------------------------------------*/
SET X = &LENGTH(&HEX)
SET L = 0
SET NUM = 0
SET HEXL = &LENGTH(&HEX)
DO WHILE(&X > 0)
IF &STR(&SUBSTR(&X:&X,&HEX)) = &STR(:) OR +
&STR(&SUBSTR(&X:&X,&HEX)) = &STR(.) THEN DO
GOTO DBKEY
END
SET A = &DATATYPE(&SUBSTR(&X:&X,&HEX))
SET V = &SUBSTR(&X:&X,&HEX)
SET &L = &L + 1
IF &A = CHAR THEN DO
IF &V < &STR(A) OR +
&V > &STR(F) THEN DO
WRITE HEX string was invalid - passed string was &HEX
GOTO DONE
END
IF &V = &STR(A) THEN SET &V = 10
IF &V = &STR(B) THEN SET &V = 11
IF &V = &STR(C) THEN SET &V = 12
IF &V = &STR(D) THEN SET &V = 13
IF &V = &STR(E) THEN SET &V = 14
IF &V = &STR(F) THEN SET &V = 15
END
IF &L > 1 THEN DO
SET &V = &V*(16**(&L-1))
END
SET &NUM = &NUM + &V
SET &X = &X - 1
END

WRITE Calculated Hex value &HEX = &NUM in decimal !
GOTO DONE

DBKEY: -
SET LINENDX = &NUM
SET NUM = 0
SET &X = &X - 1
SET L = 0
DO WHILE(&X > 0)
SET A = &DATATYPE(&SUBSTR(&X:&X,&HEX))
SET V = &SUBSTR(&X:&X,&HEX)
SET &L = &L + 1
IF &A = CHAR THEN DO
IF &V > &STR(F) THEN DO
WRITE HEX string was invalid - passed string was &HEX
GOTO DONE
END
IF &V = &STR(A) THEN SET &V = 10
IF &V = &STR(B) THEN SET &V = 11
IF &V = &STR(C) THEN SET &V = 12
IF &V = &STR(D) THEN SET &V = 13
IF &V = &STR(E) THEN SET &V = 14
IF &V = &STR(F) THEN SET &V = 15
END
IF &L > 1 THEN DO
SET &V = &V*(16**(&L-1))
END
SET &NUM = &NUM + &V
SET &X = &X - 1
END

WRITE DBKEY for Hex value &HEX = &NUM : &LINENDX !
GOTO DONE

NOVAL: -
WRITE Supplied string has no Length - taking NOVAL Exit !
EXIT CODE(0)

DONE: -
WRITE Made it to the END !
EXIT CODE(0)

/*--------------------------------------------------------------------*/
/*======================< END >=================================*/
/*--------------------------------------------------------------------*/


Gary Cherlet
Justice Technology Services
Telephone +61 (0)8 8226 5199
Facsimile +61 (0)8 8226 5311
Mobile +61 (0)41 333 1613
MailTo:cherlet.gary@saugov.sa.gov.au

This e-mail message and any attachments are qualified as follows:
Addressing: If you have received this e-mail in error, please advise by
reply e-mail to the sender. Please also destroy the original
transmission
and its contents.
Confidentiality: This e-mail may contain confidential information which
also may be legally privileged. Only the intended recipient(s) may
access,
use, distribute or copy this e-mail.
Individual Views: Unless otherwise indicated, the views expressed are
those
of the sender, not Justice Technology Services.
Computer Viruses: It is the recipient's responsibility to check the
e-mail
and any attached files for viruses.

Outcomes