Skip to main content

Does somebody know how I can insert special  characters in the sourcefile?  With NOTEPAD or WORD I have the possibility to press <Alt> and a numeric value  (Example  <Alt>225 )  for any ascii value.  But the IDE does not accept these values. Holding down <alt> Instead of inserting the value, the cursor just jumps down several lines or inserts something that does not conform with the Windows Character Set nor to the Ascii Table.

Is there a function like "insert HEX value"

thanks

Rolf

Does somebody know how I can insert special  characters in the sourcefile?  With NOTEPAD or WORD I have the possibility to press <Alt> and a numeric value  (Example  <Alt>225 )  for any ascii value.  But the IDE does not accept these values. Holding down <alt> Instead of inserting the value, the cursor just jumps down several lines or inserts something that does not conform with the Windows Character Set nor to the Ascii Table.

Is there a function like "insert HEX value"

thanks

Rolf

Hi Rolf,

do you want to use the special characters as a literal?

Try the following syntax:

    move X"434F424F4C" to my_value.

This will insert the string "COBOL" into "my_value".

The general syntax is: X"<hex-value>" where hex-value is in the range from "00" to "FF" for each character.

hope that helps

Michael


Does somebody know how I can insert special  characters in the sourcefile?  With NOTEPAD or WORD I have the possibility to press <Alt> and a numeric value  (Example  <Alt>225 )  for any ascii value.  But the IDE does not accept these values. Holding down <alt> Instead of inserting the value, the cursor just jumps down several lines or inserts something that does not conform with the Windows Character Set nor to the Ascii Table.

Is there a function like "insert HEX value"

thanks

Rolf

Hi Rolf,

do you want to use the special characters as a literal?

Try the following syntax:

    move X"434F424F4C" to my_value.

This will insert the string "COBOL" into "my_value".

The general syntax is: X"<hex-value>" where hex-value is in the range from "00" to "FF" for each character.

hope that helps

Michael


Does somebody know how I can insert special  characters in the sourcefile?  With NOTEPAD or WORD I have the possibility to press <Alt> and a numeric value  (Example  <Alt>225 )  for any ascii value.  But the IDE does not accept these values. Holding down <alt> Instead of inserting the value, the cursor just jumps down several lines or inserts something that does not conform with the Windows Character Set nor to the Ascii Table.

Is there a function like "insert HEX value"

thanks

Rolf

Hi all

of course I know this syntax, but my idea is avoid so long hex strings and put this:

MOVE  "Enviar factura a revisi¢n en plaza" to REG-PRT

instead of x"456E766961722066616374757261206120726576697369A26E20656E20706C617A61"

an other syntax would be

MOVE "Enviar factura a revisi" & x"A2" & "n en plaza" TO ....

but in my opinión the first, inserting directly the special character, is the simplest way to do it

Rolf


Does somebody know how I can insert special  characters in the sourcefile?  With NOTEPAD or WORD I have the possibility to press <Alt> and a numeric value  (Example  <Alt>225 )  for any ascii value.  But the IDE does not accept these values. Holding down <alt> Instead of inserting the value, the cursor just jumps down several lines or inserts something that does not conform with the Windows Character Set nor to the Ascii Table.

Is there a function like "insert HEX value"

thanks

Rolf

Hi rolf,

quick solution: write your string in notepad and then make copy&pasta ;-)

It works!

correct solution: report an incident to microfocus

regards

Michael


Does somebody know how I can insert special  characters in the sourcefile?  With NOTEPAD or WORD I have the possibility to press <Alt> and a numeric value  (Example  <Alt>225 )  for any ascii value.  But the IDE does not accept these values. Holding down <alt> Instead of inserting the value, the cursor just jumps down several lines or inserts something that does not conform with the Windows Character Set nor to the Ascii Table.

Is there a function like "insert HEX value"

thanks

Rolf

The reason you cannot use the Alt key is that it is set by default to be used as one of the editing keys. You can see what keys are assigned by looking at Help-->Keyboard and then turning off the ones assigned to the Alt keys that you need under Options-->Keyboard configuration.

You should then be able to insert these special characters directly using Alt 0225 for example.

Thanks.