HPlogo FCOPY Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 5 FCOPY Functions

EBCDICIN/EBCDICOUT

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

EBCDICIN translates code from EBCDIC to the character code specified in the translation table of the language you select. EBCDICOUT translates code from the character code specified in the translation table of the language you select to EBCDIC. When you do not specify a language, EBCDICIN translates code from EBCDIC to ASCII, and EBCDICOUT translates code from ASCII to EBCDIC.

Syntax

   ;{EBCDICIN

     EBCDICOUT}[={field

                 (field[;field [;...] ])}[,EXCLUDE][;LANG=language] ]


Where:

field

Is a single unsigned integer or a pair of unsigned integers representing column numbers within the records in the form a; a, b; or a:b. (The first column of a record is column #1.)

In the form a

  • a is the starting column

  • the last column in the record is the ending column

In the form a,b

  • a is the starting column

  • b is the number of columns to be converted

In the form a:b

  • a is the starting column

  • b is the ending column

EXCLUDE

Specifies that the referenced fields are not to be converted, but all other fields will be converted.

language

Is the name or number of a supported language. FCOPY uses the translation table associated with the specified language. The default is NATIVE-3000. When using a 16-bit character language, you get an error (#971).

Operation

Use EBCDICIN and EBCDICOUT to translate information from a different computer code system to the HP 3000 code system. For example, you would use EBCDICIN to translate information from IBM codes to HP 3000 codes, and EBCDICOUT to translate information from HP 3000 codes to IBM codes.

You can select any language installed on your system. The default is NATIVE-3000. For more information, refer to the Native Language Support Reference Manual (32414-90001) for MPE V/E or the Native Language Programmer's Guide (32650-90022) for MPE XL.

The field and EXCLUDE parameters let you select the portion of the file that you want to translate. If you do not specify fields or EXCLUDE, the system converts all data within each record in the file. If you specify fields without specifying EXCLUDE, the system converts only the data within those fields. If you specify fields and EXCLUDE, the system converts all data in each record except for data within the specified fields.

Restrictions

You cannot use EBCDICOUT with the CHAR, CLEAR, KANA, OCTAL, HEX, or HEXO functions.

Notes

When you use EBCDICIN or EBCDICOUT with the SUBSET function, the system makes conversions first.

Refer to appendix C for a complete list of conversion codes.

The maximum number of fields you can specify is 255.

FCOPY does not translate user labels when translating a file.

Examples

The example below copies columns 3 through 7 and 14 through 27 of each record in the file *TAPE1 to the file TEST1, converting characters from EBCDIC to ASCII. It uses the default (NATIVE-3000) translation table:

   >FROM=*TAPE1;TO=TEST1;EBCDICIN=(3:7;14:27)

The second example converts MYGEBCFL to MYROM8FL, converting characters from German EBCDIC to Roman8:

   >FROM=MYGEBCFL;TO=MYROM8FL;EBCDICIN;LANG=GERMAN

The example below copies columns 3 through 7 and 14 through 27 of each record in the file TEST1 to the file *TAPE1, converting characters from ASCII to EBCDIC. It uses the default (NATIVE-3000) translation table:

   >FROM=TEST1;TO=*TAPE1;EBCDICOUT=(3:7;14:27)

The next example converts MYROM8FL to MYGEBCFL, converting characters from Roman8 to German EBCDIC:

   >FROM=MYROM8FL;TO=MYGEBCFL;EBCDICOUT;LANG=GERMAN
Feedback to webmaster