IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Can EDCICONV convert EBCDIC to ASCII for some columns ?


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
natt.sut

New User


Joined: 01 Nov 2017
Posts: 8
Location: Thailand

PostPosted: Fri Nov 17, 2017 8:46 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Fri Nov 17, 2017 9:18 pm
Reply with quote

what did You deduce by looking at the iconv manual for zOS ???
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Fri Nov 17, 2017 9:22 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Fri Nov 17, 2017 9:22 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts Convert Service Unit to CPU Seconds All Other Mainframe Topics 1
No new posts CONVERT a given date from UTC TO BST CICS 0
No new posts Format Binary file to EBCDIC JCL & VSAM 4
No new posts Mainframe Dataset Binary or ASCII Mainframe Interview Questions 4
No new posts Need to convert date format DFSORT/ICETOOL 20
Search our Forums:

Back to Top