Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Can EDCICONV convert EBCDIC to ASCII for some columns ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
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    Post subject: Can EDCICONV convert EBCDIC to ASCII for some columns ?
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10374
Location: italy

PostPosted: Fri Nov 17, 2017 9:18 pm    Post subject: Reply to: Can EDCICONV convert EBCDIC to ASCII for some columns ?
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: 1932
Location: UK

PostPosted: Fri Nov 17, 2017 9:22 pm    Post subject:
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: 8201
Location: East Dubuque, Illinois, USA

PostPosted: Fri Nov 17, 2017 9:22 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Conversion of UTF-8 to EBCDIC muralikrishnan_new COBOL Programming 1 Tue Nov 21, 2017 5:33 pm
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts PC (UTF-8) -> z/OS (EBCDIC) -> ... prino All Other Mainframe Topics 4 Fri Sep 01, 2017 1:47 am
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us