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

Converting hex data to char


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

New User


Joined: 30 Nov 2005
Posts: 94
Location: PUNE

PostPosted: Fri Dec 28, 2007 1:23 pm
Reply with quote

Hi,

I have hex data in a PIc X(50) field and its causing some problem with some external printing software of the client.

Is there a way to convert hex data to char using cobol ?

I tried to use
INSPECT STRING1 CONVERTING X'15' TO X'40'.
but it didn't work.

Thanks & Regards,

Ranjit
Back to top
View user's profile Send private message
ranjitbhingare

New User


Joined: 30 Nov 2005
Posts: 94
Location: PUNE

PostPosted: Fri Dec 28, 2007 3:09 pm
Reply with quote

INSPECT STRING1 REPLACING X'15' BY X'40'. did work.

previously it did not work because of my stupid mistake. I should have used INSPECT twice in the program as data from 2 strings was populated in the final variable depending on condition and I inspected only 1 string.


Thanks & Regards.

Ranjit
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 Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
Search our Forums:

Back to Top