IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Query on OI - OR IMMEDIATE


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Archana_MF

New User


Joined: 21 Jul 2006
Posts: 49
Location: California

PostPosted: Fri Mar 21, 2008 1:54 am
Reply with quote

I am trying to convert Alpha to Numeric

XYZ = C'D' (Character)

OI XYZ ,X'F0'

Binary value of XYZ = 01000100
Binary value of X'F0' = 11110000
-------------------------------------------------
Binary value of Result = 11110100 = X 'F4'

Question : 4 is the numeric value I am looking for, but will 'F' be considerd as sign???

OR my entire logic is wrong???

Thanks in advance
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri Mar 21, 2008 2:22 am
Reply with quote

Your code looks just fine.

A zone-nibble of "F" is exactly what you need for unsigned display-numeric.

Keep in mind that if/when the X'F4' is packed (in Assembler), it will pack as X'4F'.

If you then need this to be packed-signed, then issue an NI X'FC' and your packed-result then becomes X'4C'.

HTH....

Regards,

Bill
Back to top
View user's profile Send private message
Archana_MF

New User


Joined: 21 Jul 2006
Posts: 49
Location: California

PostPosted: Fri Mar 21, 2008 2:53 am
Reply with quote

Thanks Bill
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
No new posts Issue with EXEC CICS QUERY SECURITY c... CICS 6
Search our Forums:

Back to Top