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

How to move a hexadecimal value to a variale.?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
trgdhilip

New User


Joined: 24 Dec 2007
Posts: 3
Location: chennai

PostPosted: Thu Jan 17, 2008 9:16 am
Reply with quote

hi
How to move a hexadecimal value to a variable.?
Or can this be done in VALUE clause while declaration.

I need to move X'0D' to variable
01 WS-VAR1 PIC X(1) .

Please give me soln.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jan 17, 2008 12:52 pm
Reply with quote

NN VARIABLE-A PIC X(01).
88 INIT-TO-0D VALUE X'0D'.

MOVE X'0D' TO VARIABLE-A.


OR

SET INIT-TO-0D TO TRUE.
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts How to move DB2 Installation HLQ DB2 4
No new posts How to move values from single dimens... COBOL Programming 1
This topic is locked: you cannot edit posts or make replies. Write Character to Hexadecimal file w... COBOL Programming 8
Search our Forums:

Back to Top