How to determine the CCSID used in CPYFRMIMPF command?

孤街醉人 提交于 2019-12-12 21:15:51

问题


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?


回答1:


Check the source and destination file CCSID's.

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

DSPFD will display the library file attributes.

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.

You can check the system default CCSID with DSPSYSVAL QCCSID.

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).



来源:https://stackoverflow.com/questions/10982810/how-to-determine-the-ccsid-used-in-cpyfrmimpf-command

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!