| United States-English |
|
|
|
![]() |
FCOPY Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 5 FCOPY FunctionsBCDICIN/BCDICOUT |
|
BCDICIN translates code from BCDIC to ASCII. BCDICOUT translates code from ASCII to BCDIC.
Where:
In the following example you have a tape file of employee information. The name and address occupy the first 75 character positions and are in BCDIC. The social security number takes up the next five character positions as a packed decimal. You can convert the BCDIC fields to ASCII, and retain the packed decimal file unchanged, by using this command:
The field and EXCLUDE parameters let you translate specific data in the file. If you do not specify fields or EXCLUDE, the system converts all data in each record in the file to ASCII. 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 in the specified fields. When you use BCDICIN or BCDICOUT with the SUBSET function, the system makes conversions first. Five BCDIC character codes can be converted to ASCII in either of two ways. FCOPY translates them as shown in table 5-1:
Refer to appendix C for a complete list of conversion codes. The maximum number of fields you can specify is 255. The translation function does not apply to user labels. If a file contains user labels, FCOPY does not translate them. The example below copies FILE1 to FILE2, converting all characters from BCDIC to ASCII, except for those in columns 1 through 5 and 10 through 30:
The example below copies FILE1 to FILE2, converting only characters in columns 1 through 5 and 10 through 30 from ASCII to BCDIC:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||