MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem in REXX utility

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
Nancy
Beginner


Joined: 23 May 2003
Posts: 77
Topics: 26

PostPosted: Tue Aug 19, 2003 7:42 am    Post subject: Problem in REXX utility Reply with quote

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
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Tue Aug 19, 2003 8:04 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Nancy
Beginner


Joined: 23 May 2003
Posts: 77
Topics: 26

PostPosted: Tue Aug 19, 2003 8:12 am    Post subject: Reply with quote

Thanks a lot.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group