Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Query on OI - OR IMMEDIATE

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: Query on OI - OR IMMEDIATE
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Mar 21, 2008 2:22 am    Post subject: Post subject: Query on OI - OR IMMEDIATE
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us