本文介绍了如何确定CPYFRMIMPF命令中使用的CCSID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将IFS流文件复制到AS400数据文件,但是使用默认的CCSID设置,复制的数据最终会变成一些奇怪的字符.在QSH下使用cat命令可以正确显示流文件的内容,因此我怀疑这与CCSID有关.我的问题是如何确定在我的情况下要使用的正确CCSID?

I am trying to copy an IFS stream file to a AS400 data file, but with the default CCSID setting the data copied ended up as some strange characters. Using cat command under QSH can display the content of the stream file correctly so I suspect that this has something to do with the CCSID. My question is how to determine what is the correct CCSID to use in my case?

推荐答案

检查CCSID的源文件和目标文件.

Check the source and destination file CCSID's.

ls -S选项>从qsh中将识别IFS文件CCSID.

The -S option to ls from qsh will identify the IFS file CCSID.

DSPFD将显示库文件属性.

如果可以cat文件,则问题很可能是目标文件CCSID.对于EBCDIC,最常见的库文件CCSID是 37 .

If you can cat the file the issue is most likely the destination file CCSID. The most common library file CCSID is 37 for EBCDIC.

您可以使用DSPSYSVAL QCCSID检查系统默认的CCSID.

You can check the system default CCSID with DSPSYSVAL QCCSID.

CPYFRMIMPF命令将基于IFS文件CCSID和库文件CCSID转换字符数据. CRTPF默认为作业CCSID(从系统CCSID继承).

The CPYFRMIMPF command will convert the character data based upon the IFS file CCSID and the library file CCSID. CRTPF defaults to the job CCSID (inherited from the system CCSID).

这篇关于如何确定CPYFRMIMPF命令中使用的CCSID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!