Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Initializing a char using ASCII value in COBOL
Hi people!

What I'm trying to do is very simple, but I just can't figure it out
since I'm not too good with COBOL. I have a set of characters that
must not be found in a particular string. I know how to search a
string and all, but my problem is that I receive the ASCII values of
these characters and I can't seem to find a way to convert them back
to chars (pic x) efficiently!? What I'm looking to do exactly is
something like this piece of "C" code does:

int iSomeChar = 64;
char cThisChar = iSomeChar;

Since ASCII for 0064 is "@", cThisChar now has the value "@". It's so
simple that I even feel dumb asking. Thanks a lot for your help,

Type-D

Report this thread to moderator Post Follow-up to this message
Old Post
Type-D
09-02-04 08:55 PM


Re: Initializing a char using ASCII value in COBOL
Would the intrinsic function "CHAR" meet your needs?

-Chuck Stevens

"Type-D" <b18cspecr@yahoo.ca> wrote in message
news:ebdca0cf.0408261240.1f740a03@posting.google.com...
> Hi people!
>
> What I'm trying to do is very simple, but I just can't figure it out
> since I'm not too good with COBOL. I have a set of characters that
> must not be found in a particular string. I know how to search a
> string and all, but my problem is that I receive the ASCII values of
> these characters and I can't seem to find a way to convert them back
> to chars (pic x) efficiently!? What I'm looking to do exactly is
> something like this piece of "C" code does:
>
> int iSomeChar = 64;
> char cThisChar = iSomeChar;
>
> Since ASCII for 0064 is "@", cThisChar now has the value "@". It's so
> simple that I even feel dumb asking. Thanks a lot for your help,
>
> Type-D



Report this thread to moderator Post Follow-up to this message
Old Post
Chuck Stevens
09-02-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:57 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.