Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use the @-Sign in Cobol ?!

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi, I`m trying to print the @-sign in one of my
Cobol-Programs. Problem is, that Cobol keeps telling
me that '@' is hex-decimal 'B5' while I think it's
'7C' !
So my source
01 AUS PIC X VALUE X'7C'.
prints out an '§'
and 01 AUS PIC X VALUE X'B5'.
prints space.

Please, help me !

 
Hi,
I believe you need to code it as hex 40, but why not just define the item as:
01 Aus pic x value "@".
If you are using a unix vi editor and it doesnt allow you to enter the character, it is because you need to press control+v first. Hope this helps.
 
Thanks for the tipps, but any
declaration in cobol-source
such as definition pic x value '@'
will be removed by my compiler.
The replacement-symbol are spaces.

The compiler-options are not changeable !
 
The x'7c' is ok for the mainframe using EBCDIC. Your problem is the font you are printing with because the x'7c' shows a '@' on the screen and also with normal printing. Perhaps you can try to print a dataset containing the possible values there are and look if there is a '@' within. Probably not in your case!

Try to use AFP definitions with the right form- and page-def if it is available at your site.

Regards,

Crox



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top