View previous topic :: View next topic
|
Author |
Message |
natt.sut
New User
Joined: 01 Nov 2017 Posts: 8 Location: Thailand
|
|
|
|
1. My VBS file has some range of column that are BINARY and I do not want to convert it,
Can I put parameter to just convert partial of file ? such as
Convert byte 1-4, and 27-100
Code: |
//ICONV EXEC PGM=EDCICONV,
// PARM=('FROMCODE(IBM-037),TOCODE(UTF-8)')
//STEPLIB DD DISP=SHR,DSN=CEE.SCEERUN
//SYSUT1 DD DISP=SHR,DSN=DAVIDS.INPUT.DSET
//SYSUT2 DD DISP=SHR,DSN=DAVIDS.OUTPUT.DSET
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY |
2. Another question is what TOCODE i should use to refer to ASCII code
UTF-8 ?
ISO8859-1 ?
IBM-874 ?
Coded |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
what did You deduce by looking at the iconv manual for zOS ??? |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Sawatdee Krahp!
You cannot mix EBCDIC and ASCII in the same data set. It is either one or the other - on the mainframe usually EBCDIC.
As you have a VBS data set changing the first 4 bytes from binary to someother datatype (zoned decimal perhaps) means that your data set is no longer VBS as the VBS information has been lost and your data length has changed as ZD takes more bytes than binary.
The thing is: why do you want to do any of this in the first place? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
EDCICONV invokes the Unix System Services program iconv to convert data. As such, you convert the entire data set / file -- you cannot pick and choose columns to convert. You'll need to write a program in the language of your choice to convert the binary (and packed decimal, if any) columns to zoned decimal before using EDCICONV.
UTF-8 is a variable width encoding; mainframes generally use ISO8859-1 for conversions into / from ASCII. You should read the manual on iconv as it has lots of good information about conversions. |
|
Back to top |
|
|
|