Examples
- To transform the Japanese DBCS ASCII file
dbfile
into an AFP data stream file calleddbfile.afp
, enter:db2afp -o dbfile.afp -l ja dbfile
The file is transformed, but not printed.
Note: You could also use this command to do a similar task, except that the output is sent to the printer:pdpr -p servC-lp -x "default-character-mapping=ibm-943" dbfile
- To transform the Korean EUC file
korefile
to an AFP data stream file calledkorefile.afp
, enter:db2afp -o korefile.afp -l ko -e korefile
The file is transformed, but not printed.
Note: You could also use this command to transform the file, then print it:pdpr -p servC-lp -x "default-character-mapping=ibm-euckr" korefile
- With InfoPrint Manager for AIX or InfoPrint Manager for Linux, to transform a Traditional Chinese DBCS ASCII file
named
memo.tc
into an AFP file and print it on an InfoPrint printer namedservC-lp
, enter:pdpr -X chinese.X -p servC-lp memo.tc
In this example, the attributes file namedchinese.X
contains these settings:document-format=dbcs-ascii default-character-mapping=ibm-950
With InfoPrint Manager for AIX or InfoPrint Manager for Linux, to set the
db2afp
command to default to Korean EUC, enter these lines in the .profile file (Bourne shell or Korn shell) or the .cshrc file (C shell) in your home directory:export PSFDBLANG=ke
The db2afp command now uses Korean EUC as long as the PSFDBLANG environment variable is set and exported, and -l or -e are not specified on the command line. So, to transform the Korean EUC filekorefile
into an AFP data stream file calledkorefile.afp
, you now can enter:db2afp -o korefile.afp korefile
Similarly, you could now use this command to transform the Korean EUC file, then print it:enq -PservC-lp -o datatype=dbcsascii korefile