FCOPY Reference Manual (32212-90008)

56 Chapter5
FCOPY Functions
BCDICIN/BCDICOUT
BCDICIN/BCDICOUT
BCDICIN translates code from BCDIC to ASCII. BCDICOUT translates code from ASCII to
BCDIC.
Syntax
;{BCDICIN
BCDICOUT} [={
field
(
field
[;
field
[;...] ] ) } [,EXCLUDE] ]
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 identified fields are not to be translated. All other fields
are translated.
Operation
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:
FCOPY FROM=*TAPEFILE;TO=*EMPDAT;NEW;BCDICIN=1,75
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.