View previous topic :: View next topic |
Author |
Message |
Nancy Beginner
Joined: 23 May 2003 Posts: 77 Topics: 26
|
Posted: Tue Aug 19, 2003 7:42 am Post subject: Problem in REXX utility |
|
|
Hi,
I want to convert a specified line (on which cursor is) in HEX format. I've written a REXX for this but its not solving the whole purpose. Its displaying the HEX line in a single one and so not readable. HEX lines should be displayed in two lines. Please suggest.
/**************REXX****************/
ADDRESS ISPEXEC
"ISREDIT MACRO (PARM1) NOPROCESS"
" ISREDIT RESET "
"ISREDIT (DSNLINE) = LINE .ZCSR"
SAY DSNLINE
"ISREDIT LABEL .ZCSR = .TEMP "
HEXLINE = C2X(DSNLINE)
SAY HEXLINE
"ISREDIT RESET "
"ISREDIT LINE_AFTER .TEMP = DATALINE (HEXLINE)"
Thanks |
|
Back to top |
|
 |
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Tue Aug 19, 2003 8:04 am Post subject: |
|
|
Hi Nancy
Here is a little routine that accept a string, and produced a 2 lines hex.
Code: |
/* REXX */
MYSTRING = 'THIS IS MY STRING'
CALL SPLIT MYSTRING
SAY UP ; SAY BOT
EXIT
SPLIT:
MYSTRING = C2X(MYSTRING)
LEN = LENGTH(MYSTRING)
DO I = 1 TO LEN BY 2
UP = UP||SUBSTR(MYSTRING,I,1)
END
DO I = 2 TO LEN BY 2
BOT = BOT||SUBSTR(MYSTRING,I,1)
END
UP = DELSTR(UP,1,2)
BOT = DELSTR(BOT,1,3)
RETURN |
O.
________
marijuana vaporizers
Last edited by ofer71 on Sat Feb 05, 2011 11:03 am; edited 1 time in total |
|
Back to top |
|
 |
Nancy Beginner
Joined: 23 May 2003 Posts: 77 Topics: 26
|
Posted: Tue Aug 19, 2003 8:12 am Post subject: |
|
|
Thanks a lot. |
|
Back to top |
|
 |
|
|