Often it is not obvious which "x2y" conversion function has to be used.  For
example; do you need X2C or C2X?
Therefore I wrote an XTOX EXEC that tries all REXX conversions and show the
result.  It is part of
    http://www.vm.ibm.com/download/packages/descript.cgi?REXXG

For example XTOX 56 displays:
C2D(56)=13622                           =X'3133363232'
C2X(56)=3536                            =X'33353336'
D2C(56)=8                               =X'38'
D2X(56)=38                              =X'3338'
X2C(56)=V                               =X'56'
X2D(56)=86                              =X'3836'
X2B(56)=01010110                        =X'3031303130313130'
B2X(56)=impossible

2010/4/30 Bruce Roy <brucer...@hotmail.com>

> Try using the X2C REXX builtin function.  For example,
>
>   String = X2c(PRK)
>
> If the value of PRK will ever have a length different than 4 (which seems
> to
> be required by your logic), check the X2c documentation for the length
> operand.
>
> -----------------------------
>
> From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On
> Behalf Of Horlick, Michael
> Sent: Friday, April 30, 2010 9:37 AM
> To: IBMVM@LISTSERV.UARK.EDU
> Subject: How to work with hex in REXX
>
> Greetings,
>
> I have a character field for example 0001A735 (PRK)
>
> I have record like this ‘DATA DATA YYYY’. I want to replace ‘YYYY’ with
> x’0001A735’.
>
> Tried :
>
> String = "'"||PRK||"'x"
> JCL.J = Overlay(String,Record,WORK,4)
>
> Where work = position of ‘YYYY’ in record
>
> Not working.
>
> Mike Horlick
> Conseiller
> CGI Gestion Intégrée des Technologies
> 1350 Boul. René-Lévesque Ouest
> Montréal, Qc, H3G 1T4
>



-- 
Kris Buelens,
IBM Belgium, VM customer support

Reply via email to