Re: Data conversion EBCDIC to ASCII
Knowing that, then here's the series of commands I recommend you issue, starting at ISPF 6: == oput 'BRASIL.ZOS.CONTEST.JCL(DATA1)' '/data1' binary == omvs(you are put into UNIX) == iconv -f ibm-1047 -t iso8859-1 data1 data2 == exit (you leave UNIX, return to ISPF 6) == oget '/data1' 'BRASIL.ZOS.CONTEST.JCL(DATA1)' binary Since your advice is to do the conversion from the UNIX shell, why not do everything from there? A lot less troubles to be expected. What will likely be the next error reported by Claudio? I bet it'll be: iconv: FSUM6180 file data1: EDC5129I No such file or directory. Why? He posted: ... THE OPENING OF HFS FILE /DATA1 See the upper case in the file name? I'd suggest: 1) OMVS to start a UNIX shell. Or, if available, better use telnet, rlogin, SSH to log into UNIX. 2) cp //'BRASIL.ZOS.CONTEST.JCL(DATA1)' data1 3) iconv -f ibm-1047 -t iso8859-1 data1 data2 don't forget output redirection ()! 4) cp data2 //'BRASIL.ZOS.CONTEST.JCL(DATA1)' 5) ctrl-d or exit to leave the shell (or just keep the session around if using telnet, rlogin, SSH, you might need to try once more :-) -- Peter Hunkeler Credit Suisse -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII
Hunkeler Peter (KIUK 3) wrote: Knowing that, then here's the series of commands I recommend you issue, starting at ISPF 6: == oput 'BRASIL.ZOS.CONTEST.JCL(DATA1)' '/data1' binary == omvs(you are put into UNIX) == iconv -f ibm-1047 -t iso8859-1 data1 data2 == exit (you leave UNIX, return to ISPF 6) == oget '/data1' 'BRASIL.ZOS.CONTEST.JCL(DATA1)' binary Since your advice is to do the conversion from the UNIX shell, why not do everything from there? A lot less troubles to be expected. What will likely be the next error reported by Claudio? I bet it'll be: iconv: FSUM6180 file data1: EDC5129I No such file or directory. Why? He posted: ... THE OPENING OF HFS FILE /DATA1 See the upper case in the file name? Yes, I figured that was the next thing to come up. I'd suggest: 1) OMVS to start a UNIX shell. Or, if available, better use telnet, rlogin, SSH to log into UNIX. 2) cp //'BRASIL.ZOS.CONTEST.JCL(DATA1)' data1 3) iconv -f ibm-1047 -t iso8859-1 data1 data2 don't forget output redirection ()! 4) cp data2 //'BRASIL.ZOS.CONTEST.JCL(DATA1)' 5) ctrl-d or exit to leave the shell (or just keep the session around if using telnet, rlogin, SSH, you might need to try once more :-) I like it. I still think he needs to have his own home directory, however. I was trying to take it one step at a time to discover his environment. Kind regards, -Steve Comstock The Trainer's Friend, Inc. 303-393-8716 http://www.trainersfriend.com z/OS Application development made easier * Our classes include + How things work + Programming examples with realistic applications + Starter / skeleton code + Complete working programs + Useful utilities and subroutines + Tips and techniques == Check out the Trainer's Friend Store to purchase z/OS == == application developer toolkits. Sample code in four== == programming languages, JCL to Assemble or compile, == == bind and test. == == http://www.trainersfriend.com/TTFStore/index.html== -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII
On Fri, 26 Sep 2008 07:59:40 +0200, Hunkeler Peter (KIUK 3) wrote: I'd suggest: 1) OMVS to start a UNIX shell. Or, if available, better use telnet, rlogin, SSH to log into UNIX. 2) cp //'BRASIL.ZOS.CONTEST.JCL(DATA1)' data1 3) iconv -f ibm-1047 -t iso8859-1 data1 data2 don't forget output redirection ()! 4) cp data2 //'BRASIL.ZOS.CONTEST.JCL(DATA1)' 5) ctrl-d or exit to leave the shell (or just keep the session around if using telnet, rlogin, SSH, you might need to try once more :-) Or, if the OP has insufficient z/OS Unix temporary file space (or none at all), which seems to have been a problem: cp //'BRASIL.ZOS.CONTEST.JCL(EBCDIC)' /dev/fd/1 | iconv -f ibm-1047 -t iso8859-1| cp /dev/fd/0 //'BRASIL.ZOS.CONTEST.JCL(ASCII)' (It's best not to overwrite the original input file because you might need to try once more.) -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII
On Fri, 26 Sep 2008 07:59:40 +0200, Hunkeler Peter (KIUK 3) [EMAIL PROTECTED] wrote: snip I'd suggest: 1) OMVS to start a UNIX shell. Or, if available, better use telnet, rlogin, SSH to log into UNIX. 2) cp //'BRASIL.ZOS.CONTEST.JCL(DATA1)' data1 3) iconv -f ibm-1047 -t iso8859-1 data1 data2 don't forget output redirection ()! 4) cp data2 //'BRASIL.ZOS.CONTEST.JCL(DATA1)' 5) ctrl-d or exit to leave the shell (or just keep the session around if using telnet, rlogin, SSH, you might need to try once more :-) -- Peter Hunkeler Credit Suisse I'd really suggest installation of Dovetailed Technologies Co:Z free product. Why? It will do the above in a single step! fromdsn -s IBM-1047 -t ISO8859-1 'BRASIL.ZOS.CONTEST.JCL(DATA1)' /data1 reverse it? todsn -s ISO8859-1 -t IBM-1047 'BRASIL.ZOS.CONTEST.JCL(DATA1)' /data1 -- John -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII
(It's best not to overwrite the original input file because you might need to try once more.) In case of iconv, I seem to remeber that it even doesn't support using the same file as input and as output. -- Peter Hunkeler Credit Suisse -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII
John McKown wrote: On Fri, 26 Sep 2008 07:59:40 +0200, Hunkeler Peter (KIUK 3) [EMAIL PROTECTED] wrote: snip I'd suggest: 1) OMVS to start a UNIX shell. Or, if available, better use telnet, rlogin, SSH to log into UNIX. 2) cp //'BRASIL.ZOS.CONTEST.JCL(DATA1)' data1 3) iconv -f ibm-1047 -t iso8859-1 data1 data2 don't forget output redirection ()! 4) cp data2 //'BRASIL.ZOS.CONTEST.JCL(DATA1)' 5) ctrl-d or exit to leave the shell (or just keep the session around if using telnet, rlogin, SSH, you might need to try once more :-) -- Peter Hunkeler Credit Suisse I'd really suggest installation of Dovetailed Technologies Co:Z free product. Why? It will do the above in a single step! fromdsn -s IBM-1047 -t ISO8859-1 'BRASIL.ZOS.CONTEST.JCL(DATA1)' /data1 reverse it? todsn -s ISO8859-1 -t IBM-1047 'BRASIL.ZOS.CONTEST.JCL(DATA1)' /data1 -- John Hey guys, I think the cp commands need to use the B flag, otherwise you get the strange NL, CRLF kinda' exchange going. Not sure how the Dovetailed software handles that. Kind regards, -Steve Comstock The Trainer's Friend, Inc. 303-393-8716 http://www.trainersfriend.com z/OS Application development made easier * Our classes include + How things work + Programming examples with realistic applications + Starter / skeleton code + Complete working programs + Useful utilities and subroutines + Tips and techniques == Check out the Trainer's Friend Store to purchase z/OS == == application developer toolkits. Sample code in four== == programming languages, JCL to Assemble or compile, == == bind and test. == == http://www.trainersfriend.com/TTFStore/index.html== -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII
Steve Comstock wrote: John McKown wrote: On Fri, 26 Sep 2008 07:59:40 +0200, Hunkeler Peter (KIUK 3) [EMAIL PROTECTED] wrote: snip I'd suggest: 1) OMVS to start a UNIX shell. Or, if available, better use telnet, rlogin, SSH to log into UNIX. 2) cp //'BRASIL.ZOS.CONTEST.JCL(DATA1)' data1 3) iconv -f ibm-1047 -t iso8859-1 data1 data2 don't forget output redirection ()! 4) cp data2 //'BRASIL.ZOS.CONTEST.JCL(DATA1)' 5) ctrl-d or exit to leave the shell (or just keep the session around if using telnet, rlogin, SSH, you might need to try once more :-) -- Peter Hunkeler Credit Suisse I'd really suggest installation of Dovetailed Technologies Co:Z free product. Why? It will do the above in a single step! fromdsn -s IBM-1047 -t ISO8859-1 'BRASIL.ZOS.CONTEST.JCL(DATA1)' /data1 reverse it? todsn -s ISO8859-1 -t IBM-1047 'BRASIL.ZOS.CONTEST.JCL(DATA1)' /data1 -- John Hey guys, I think the cp commands need to use the B flag, otherwise you get the strange NL, CRLF kinda' exchange going. Not sure how the Dovetailed software handles that. Amending my own post, it looks like -F bin would also suffice for the cp commands. And the docs are sufficiently muddied here that maybe you don't need either after all, since in their absence the command tries to determing implicitly the type of copy to do. Kind regards, -Steve Comstock The Trainer's Friend, Inc. 303-393-8716 http://www.trainersfriend.com z/OS Application development made easier * Our classes include + How things work + Programming examples with realistic applications + Starter / skeleton code + Complete working programs + Useful utilities and subroutines + Tips and techniques == Check out the Trainer's Friend Store to purchase z/OS == == application developer toolkits. Sample code in four== == programming languages, JCL to Assemble or compile, == == bind and test. == == http://www.trainersfriend.com/TTFStore/index.html== -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII
On Fri, 26 Sep 2008 08:59:06 -0500, Paul Gilmartin [EMAIL PROTECTED] wrote: On Fri, 26 Sep 2008 07:59:40 +0200, Hunkeler Peter (KIUK 3) wrote: I'd suggest: 1) OMVS to start a UNIX shell. Or, if available, better use telnet, rlogin, SSH to log into UNIX. 2) cp //'BRASIL.ZOS.CONTEST.JCL(DATA1)' data1 3) iconv -f ibm-1047 -t iso8859-1 data1 data2 don't forget output redirection ()! 4) cp data2 //'BRASIL.ZOS.CONTEST.JCL(DATA1)' 5) ctrl-d or exit to leave the shell (or just keep the session around if using telnet, rlogin, SSH, you might need to try once more :-) Or, if the OP has insufficient z/OS Unix temporary file space (or none at all), which seems to have been a problem: cp //'BRASIL.ZOS.CONTEST.JCL(EBCDIC)' /dev/fd/1 | iconv -f ibm-1047 -t iso8859-1| cp /dev/fd/0 //'BRASIL.ZOS.CONTEST.JCL(ASCII)' (It's best not to overwrite the original input file because you might need to try once more.) What was wrong with this suggestion 5 days ago? z/OS UNIX wasn't required at all nor the considerations that go along with (OMVS segments, intermediate storage etc.). http://bama.ua.edu/cgi-bin/wa?A2=ind0809L=ibm-mainD=1amp;O=DF=S=P=135974 Mark -- Mark Zelden Sr. Software and Systems Architect - z/OS Team Lead Zurich North America / Farmers Insurance Group - ZFUS G-ITO mailto:[EMAIL PROTECTED] z/OS Systems Programming expert at http://expertanswercenter.techtarget.com/ Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII
On Fri, 26 Sep 2008 16:50:24 +0200, Hunkeler Peter (KIUK 3) [EMAIL PROTECTED] wrote: (It's best not to overwrite the original input file because you might need to try once more.) In case of iconv, I seem to remeber that it even doesn't support using the same file as input and as output. -- Peter Hunkeler Credit Suisse iconv does not write its output to a file. It writes its output to stdout. And doing something like: iconv -f IBM-1047 -t ISO8859-1 data data is a poor way to make the file data into a zero length file. Which is what the above will do. -- John -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII
On Fri, 26 Sep 2008 08:59:06 -0500, Paul Gilmartin [EMAIL PROTECTED] wrote: snip Or, if the OP has insufficient z/OS Unix temporary file space (or none at all), which seems to have been a problem: cp //'BRASIL.ZOS.CONTEST.JCL(EBCDIC)' /dev/fd/1 | iconv -f ibm-1047 -t iso8859-1| cp /dev/fd/0 //'BRASIL.ZOS.CONTEST.JCL(ASCII)' (It's best not to overwrite the original input file because you might need to try once more.) -- gil Or, using my favorite Co:Z fromdsn -s IBM-1047 -t ISO8859-1 'BRASIL.ZOS.CONTEST.JCL(EBCDIC)' | \ todsn 'BRASIL.ZOS.CONTEST.JCL(ASCII)' I don't work for these people, honest. I am just very impressed with the functionality. For those who are lucky enough to be able to get it installed. Actually, if I needed to do this myself, I'd probably write an HLASM edit macro for ISPF edit which would convert from EBCDIC to ASCII in the edit buffer and just allow the user to either SAVE it back to the original or a new member. -- John -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII
On Fri, 26 Sep 2008 10:09:21 -0500, Mark Zelden [EMAIL PROTECTED] wrote: snip What was wrong with this suggestion 5 days ago? z/OS UNIX wasn't required at all nor the considerations that go along with (OMVS segments, intermediate storage etc.). http://bama.ua.edu/cgi-bin/wa?A2=ind0809L=ibm-mainD=1amp;amp;O=DF=S=P=135974 Mark -- Mark Zelden It's just too simple to be acceptable! -- John -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII
On Fri, 26 Sep 2008 09:05:43 -0600, Steve Comstock [EMAIL PROTECTED] wrote: snip I'd really suggest installation of Dovetailed Technologies Co:Z free product. Why? It will do the above in a single step! fromdsn -s IBM-1047 -t ISO8859-1 'BRASIL.ZOS.CONTEST.JCL(DATA1)' /data1 reverse it? todsn -s ISO8859-1 -t IBM-1047 'BRASIL.ZOS.CONTEST.JCL(DATA1)' /data1 -- John Hey guys, I think the cp commands need to use the B flag, otherwise you get the strange NL, CRLF kinda' exchange going. Not sure how the Dovetailed software handles that. Kind regards, -Steve Comstock The fromdsn command has another switch which can specify the end of line character: -l lf -l cr -l crlf -l nl specifies x'0a', x'0d', x'0d0a', and x'15' (?) respectively. The todsn can take the same switch, but defaults to understanding all of the above as a line end. -- John -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII
todsn and fromdsn were designed to be swiss-army-knife tools for converting pipes to/from datasets, so codepage and line termination are only a couple of the many options. For complete man pages, see: http://dovetail.com/docs/coz/dsp-ref.html In the interest of full disclosure, we should probably mention that John gets 10% of the license revenue from Co:Z. Unfortunately for John, its a free product (Apache 2.0 binary license) :-) (Commercial support contracts are available) Kirk Wolf Dovetailed Technologies On Fri, Sep 26, 2008 at 10:09 AM, John McKown [EMAIL PROTECTED] wrote: On Fri, 26 Sep 2008 09:05:43 -0600, Steve Comstock [EMAIL PROTECTED] wrote: snip I'd really suggest installation of Dovetailed Technologies Co:Z free product. Why? It will do the above in a single step! fromdsn -s IBM-1047 -t ISO8859-1 'BRASIL.ZOS.CONTEST.JCL(DATA1)' /data1 reverse it? todsn -s ISO8859-1 -t IBM-1047 'BRASIL.ZOS.CONTEST.JCL(DATA1)' /data1 -- John Hey guys, I think the cp commands need to use the B flag, otherwise you get the strange NL, CRLF kinda' exchange going. Not sure how the Dovetailed software handles that. Kind regards, -Steve Comstock The fromdsn command has another switch which can specify the end of line character: -l lf -l cr -l crlf -l nl specifies x'0a', x'0d', x'0d0a', and x'15' (?) respectively. The todsn can take the same switch, but defaults to understanding all of the above as a line end. -- John -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII
Claudio Marcio wrote: Hi, This is my dataset Data Set Name . . . . : BRASIL.ZOS.CONTEST.JCL General Data Current Allocation Management class . . : USRMGMT Allocated tracks . : 2 Storage class . . . : USRBASE Allocated extents . : 1 Volume serial . . . : DMTU08 Device type . . . . : 3390 Data class . . . . . : **None** Current Utilization Organization . . . : PO Used tracks . . . . : 2 Record format . . . : FB Used extents . . . : 1 Record length . . . : 80 Block size . . . . : 27920 1st extent tracks . : 2 Secondary tracks . : 1 Data set name type : PDS NO Creation date . . . : 2008/09/16 Referenced date . . : 2008/09/24 Expiration date . . : ***None*** - This is the member of my dataset with EBCDIC code: VIEW BRASIL.ZOS.CONTEST.JCL Row 1 of 3 Command === Scroll === PAGE Name Prompt Size Created Changed ID _ DATA 13 2008/07/24 2008/09/20 00:07:49 BRASIL **End** - Questions about oput command: oput '..zzz(member)' '/u/yourid/member' binary in 'x..zzz(member) - I type 'BRASIL.ZOS.CONTEST.JCL(DATA1)' ??? in '/u/yourid/member' binary - I type '/u/BRASIL/DATA1' binary ?? - Look when typed the omvs command, and then the pwd command to see my id. Appeared in the information below: IBM Licensed Material - Property of IBM 5694-A01 (C) Copyright IBM Corp. 1993, 2004 (C) Copyright Mortice Kern Systems, Inc., 1985, 1996. (C) Copyright Software Development Group, University of Waterloo, 1989. All Rights Reserved. U.S. Government users - RESTRICTED RIGHTS - Use, Duplication, or Disclosure restricted by GSA-ADP schedule contract with IBM Corp. IBM is a registered trademark of the IBM Corp. BRASIL:/: pwd / BRASIL:/: OK. So your home is root. Not a good idea, but I'm finding it to be pretty common. Knowing that, then here's the series of commands I recommend you issue, starting at ISPF 6: == oput 'BRASIL.ZOS.CONTEST.JCL(DATA1)' '/data1' binary == omvs(you are put into UNIX) == iconv -f ibm-1047 -t iso8859-1 data1 data2 == exit (you leave UNIX, return to ISPF 6) == oget '/data1' 'BRASIL.ZOS.CONTEST.JCL(DATA1)' binary done. regards - Original Message - From: Steve Comstock [EMAIL PROTECTED] Newsgroups: bit.listserv.ibm-main To: IBM-MAIN@BAMA.UA.EDU Sent: Sunday, September 21, 2008 4:17 AM Subject: Re: Data conversion EBCDIC to ASCII Claudio Marcio wrote: Hi, I use the system z / OS version V1R6 How I see if my directory is /u/ and my file is encoded in ibm-1047 in that System?? == oput '..zzz(member)' '/u/yourid/member' binary == omvs == iconv -f ibm-1047 -t iso8859-1 member member2 == exit == oget '/u/yourid/member2' '..zzz(member)' binary In main menu, i have a command line option - ( option number 6 ) the above commands run this route?? yes, all of these commands are issued from ISPF option 6 When you enter the omvs command, you are placed into UNIX; the next two commands are actually issued while you are in UNIX. So, go to ISPF 6 and enter the first two commands (oput and omvs) when you are in UNIX, issue == pwd this will display your current directory. if it is /u/ followed by your tso id in lower case, then you are good. It may be you are not set up to run under UNIX, however; if not you need to have your systems programmer add an omvs segment to your security profile (RACF, ACF2, Top Secret, any other). This is where you specify the home directory (and some other attributues). If you are not set up to run under UNIX, the omvs command will fail. the exit command leaves UNIX and returns to yout ISPF 6 command line to enter the oget command. I have tested this series of commands, and it does what you want, assuming the various parts for you running under UNIX are in place. As far as knowing what code page is used for a file, there really is no magic way. The default code page for z/OS is ibm-037, the default code page for the unix shell is ibm-1047. But these can be changed by systems people. In most cases, the various EBCDIC code pages are the same; it's only some special characters and some language-specific characters that have varying code points. If your member only contains English alphabetic characters, numeric digits, and a few special characters, almost any of the EBCDIC code pages will work in the iconv command. The page http://www.tachyonsoft.com/cpindex.htm contains
Re: Data conversion EBCDIC to ASCII - correction
Steve Comstock wrote: [Whoops! fixed a typo in the oget command below. sorry.] OK. So your home is root. Not a good idea, but I'm finding it to be pretty common. Knowing that, then here's the series of commands I recommend you issue, starting at ISPF 6: == oput 'BRASIL.ZOS.CONTEST.JCL(DATA1)' '/data1' binary == omvs(you are put into UNIX) == iconv -f ibm-1047 -t iso8859-1 data1 data2 == exit (you leave UNIX, return to ISPF 6) == oget '/data2' 'BRASIL.ZOS.CONTEST.JCL(DATA1)' binary done. Kind regards, -Steve Comstock The Trainer's Friend, Inc. 303-393-8716 http://www.trainersfriend.com z/OS Application development made easier * Our classes include + How things work + Programming examples with realistic applications + Starter / skeleton code + Complete working programs + Useful utilities and subroutines + Tips and techniques == Check out the Trainer's Friend Store to purchase z/OS == == application developer toolkits. Sample code in four== == programming languages, JCL to Assemble or compile, == == bind and test. == == http://www.trainersfriend.com/TTFStore/index.html== -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII - correction
After type the oput command see the message below : IGD103I SMS ALLOCATED TO DDNAME SYS00107 BPXF105E RETURN CODE 006F, REASON CODE 5B450002. AN ERROR OCCURRED DURING THE OPENING OF HFS FILE /DATA1. *** ... not be open the file why??? regards, - Original Message - From: Steve Comstock [EMAIL PROTECTED] Newsgroups: bit.listserv.ibm-main To: IBM-MAIN@BAMA.UA.EDU Sent: Thursday, September 25, 2008 11:45 AM Subject: Re: Data conversion EBCDIC to ASCII - correction Steve Comstock wrote: [Whoops! fixed a typo in the oget command below. sorry.] OK. So your home is root. Not a good idea, but I'm finding it to be pretty common. Knowing that, then here's the series of commands I recommend you issue, starting at ISPF 6: == oput 'BRASIL.ZOS.CONTEST.JCL(DATA1)' '/data1' binary == omvs(you are put into UNIX) == iconv -f ibm-1047 -t iso8859-1 data1 data2 == exit (you leave UNIX, return to ISPF 6) == oget '/data2' 'BRASIL.ZOS.CONTEST.JCL(DATA1)' binary done. Kind regards, -Steve Comstock The Trainer's Friend, Inc. 303-393-8716 http://www.trainersfriend.com z/OS Application development made easier * Our classes include + How things work + Programming examples with realistic applications + Starter / skeleton code + Complete working programs + Useful utilities and subroutines + Tips and techniques == Check out the Trainer's Friend Store to purchase z/OS == == application developer toolkits. Sample code in four== == programming languages, JCL to Assemble or compile, == == bind and test. == == http://www.trainersfriend.com/TTFStore/index.html== -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII - correction
Claudio Marcio wrote: After type the oput command see the message below : IGD103I SMS ALLOCATED TO DDNAME SYS00107 BPXF105E RETURN CODE 006F, REASON CODE 5B450002. AN ERROR OCCURRED DURING THE OPENING OF HFS FILE /DATA1. *** ... not be open the file why??? regards, The error indicates you are not authorized to create a file in that directory. You really need to talk to your systems and / or security people to set you up with an omvs segment that has your own directory, usually of the form /u/userid where 'userid' is your tso id in lower case. They will need to allocate an HFS file for you and mount it at your /u/userid mountpoint. - Original Message - From: Steve Comstock [EMAIL PROTECTED] Newsgroups: bit.listserv.ibm-main To: IBM-MAIN@BAMA.UA.EDU Sent: Thursday, September 25, 2008 11:45 AM Subject: Re: Data conversion EBCDIC to ASCII - correction Steve Comstock wrote: [Whoops! fixed a typo in the oget command below. sorry.] OK. So your home is root. Not a good idea, but I'm finding it to be pretty common. Knowing that, then here's the series of commands I recommend you issue, starting at ISPF 6: == oput 'BRASIL.ZOS.CONTEST.JCL(DATA1)' '/data1' binary == omvs(you are put into UNIX) == iconv -f ibm-1047 -t iso8859-1 data1 data2 == exit (you leave UNIX, return to ISPF 6) == oget '/data2' 'BRASIL.ZOS.CONTEST.JCL(DATA1)' binary done. Kind regards, -Steve Comstock The Trainer's Friend, Inc. 303-393-8716 http://www.trainersfriend.com z/OS Application development made easier * Our classes include + How things work + Programming examples with realistic applications + Starter / skeleton code + Complete working programs + Useful utilities and subroutines + Tips and techniques == Check out the Trainer's Friend Store to purchase z/OS == == application developer toolkits. Sample code in four== == programming languages, JCL to Assemble or compile, == == bind and test. == == http://www.trainersfriend.com/TTFStore/index.html== -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- Kind regards, -Steve Comstock The Trainer's Friend, Inc. 303-393-8716 http://www.trainersfriend.com z/OS Application development made easier * Our classes include + How things work + Programming examples with realistic applications + Starter / skeleton code + Complete working programs + Useful utilities and subroutines + Tips and techniques == Check out the Trainer's Friend Store to purchase z/OS == == application developer toolkits. Sample code in four== == programming languages, JCL to Assemble or compile, == == bind and test. == == http://www.trainersfriend.com/TTFStore/index.html== -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII - correction
I had managed to find the error ... see .. Description RSN_GCRE + HFS_RSN_Access_Denied (X'0002') RSN_GCRE_Access_Denied The current (requesting) process does not have the requested access authority to the file, or directory. Cause: A higher access authority is being requested for this file, or directory, than is defined for this user. Action: Verify that the correct access authority is being requested. If so, contact the file, or directory, owner and request that the access authority be changed strange .. I even wrote this dataset and I can not change it? I have some other alternative? regards - Original Message - From: Steve Comstock [EMAIL PROTECTED] Newsgroups: bit.listserv.ibm-main To: IBM-MAIN@BAMA.UA.EDU Sent: Thursday, September 25, 2008 6:45 PM Subject: Re: Data conversion EBCDIC to ASCII - correction Claudio Marcio wrote: After type the oput command see the message below : IGD103I SMS ALLOCATED TO DDNAME SYS00107 BPXF105E RETURN CODE 006F, REASON CODE 5B450002. AN ERROR OCCURRED DURING THE OPENING OF HFS FILE /DATA1. *** ... not be open the file why??? regards, The error indicates you are not authorized to create a file in that directory. You really need to talk to your systems and / or security people to set you up with an omvs segment that has your own directory, usually of the form /u/userid where 'userid' is your tso id in lower case. They will need to allocate an HFS file for you and mount it at your /u/userid mountpoint. / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII - correction
Claudio Marcio wrote: I had managed to find the error ... see .. Description RSN_GCRE + HFS_RSN_Access_Denied (X'0002') RSN_GCRE_Access_Denied The current (requesting) process does not have the requested access authority to the file, or directory. Cause: A higher access authority is being requested for this file, or directory, than is defined for this user. Action: Verify that the correct access authority is being requested. If so, contact the file, or directory, owner and request that the access authority be changed strange .. I even wrote this dataset and I can not change it? I have some other alternative? regards It's not that you don't have access to the source file, but you don't have authority to copy anything into the root (/) directory in the HFS. This is why you need your own directory. Kind regards, -Steve Comstock The Trainer's Friend, Inc. 303-393-8716 http://www.trainersfriend.com z/OS Application development made easier * Our classes include + How things work + Programming examples with realistic applications + Starter / skeleton code + Complete working programs + Useful utilities and subroutines + Tips and techniques == Check out the Trainer's Friend Store to purchase z/OS == == application developer toolkits. Sample code in four== == programming languages, JCL to Assemble or compile, == == bind and test. == == http://www.trainersfriend.com/TTFStore/index.html== -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII
In [EMAIL PROTECTED], on 09/19/2008 at 08:27 PM, Claudio Marcio [EMAIL PROTECTED] said: How do I convert a member with data EBCDIC to ASCII in the TSO environment? You almost certainly don't want to convert to ASCII, but rather to some code page that matches ASCII for code points 40-FE. Your first step is to determine which code pages are appropriate for your application. Note that there are multiple EBCDIC code pages, so you need to determine both the appropriate input page and the appropriate output page. There are several different conventions for ending lines. You need to determine whether you need conversion between two of End of logical record EBCDIC NL CRLF LF Read up on iconv. Once you've done that, the suggestions that others have posted here should work. -- Shmuel (Seymour J.) Metz, SysProg and JOAT ISO position; see http://patriot.net/~shmuel/resume/brief.html We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII
Hi, This is my dataset Data Set Name . . . . : BRASIL.ZOS.CONTEST.JCL General Data Current Allocation Management class . . : USRMGMT Allocated tracks . : 2 Storage class . . . : USRBASE Allocated extents . : 1 Volume serial . . . : DMTU08 Device type . . . . : 3390 Data class . . . . . : **None** Current Utilization Organization . . . : PO Used tracks . . . . : 2 Record format . . . : FB Used extents . . . : 1 Record length . . . : 80 Block size . . . . : 27920 1st extent tracks . : 2 Secondary tracks . : 1 Data set name type : PDS NO Creation date . . . : 2008/09/16 Referenced date . . : 2008/09/24 Expiration date . . : ***None*** - This is the member of my dataset with EBCDIC code: VIEW BRASIL.ZOS.CONTEST.JCL Row 1 of 3 Command === Scroll === PAGE Name Prompt Size Created Changed ID _ DATA 13 2008/07/24 2008/09/20 00:07:49 BRASIL **End** - Questions about oput command: oput '..zzz(member)' '/u/yourid/member' binary in 'x..zzz(member) - I type 'BRASIL.ZOS.CONTEST.JCL(DATA1)' ??? in '/u/yourid/member' binary - I type '/u/BRASIL/DATA1' binary ?? - Look when typed the omvs command, and then the pwd command to see my id. Appeared in the information below: IBM Licensed Material - Property of IBM 5694-A01 (C) Copyright IBM Corp. 1993, 2004 (C) Copyright Mortice Kern Systems, Inc., 1985, 1996. (C) Copyright Software Development Group, University of Waterloo, 1989. All Rights Reserved. U.S. Government users - RESTRICTED RIGHTS - Use, Duplication, or Disclosure restricted by GSA-ADP schedule contract with IBM Corp. IBM is a registered trademark of the IBM Corp. BRASIL:/: pwd / BRASIL:/: regards - Original Message - From: Steve Comstock [EMAIL PROTECTED] Newsgroups: bit.listserv.ibm-main To: IBM-MAIN@BAMA.UA.EDU Sent: Sunday, September 21, 2008 4:17 AM Subject: Re: Data conversion EBCDIC to ASCII Claudio Marcio wrote: Hi, I use the system z / OS version V1R6 How I see if my directory is /u/ and my file is encoded in ibm-1047 in that System?? == oput '..zzz(member)' '/u/yourid/member' binary == omvs == iconv -f ibm-1047 -t iso8859-1 member member2 == exit == oget '/u/yourid/member2' '..zzz(member)' binary In main menu, i have a command line option - ( option number 6 ) the above commands run this route?? yes, all of these commands are issued from ISPF option 6 When you enter the omvs command, you are placed into UNIX; the next two commands are actually issued while you are in UNIX. So, go to ISPF 6 and enter the first two commands (oput and omvs) when you are in UNIX, issue == pwd this will display your current directory. if it is /u/ followed by your tso id in lower case, then you are good. It may be you are not set up to run under UNIX, however; if not you need to have your systems programmer add an omvs segment to your security profile (RACF, ACF2, Top Secret, any other). This is where you specify the home directory (and some other attributues). If you are not set up to run under UNIX, the omvs command will fail. the exit command leaves UNIX and returns to yout ISPF 6 command line to enter the oget command. I have tested this series of commands, and it does what you want, assuming the various parts for you running under UNIX are in place. As far as knowing what code page is used for a file, there really is no magic way. The default code page for z/OS is ibm-037, the default code page for the unix shell is ibm-1047. But these can be changed by systems people. In most cases, the various EBCDIC code pages are the same; it's only some special characters and some language-specific characters that have varying code points. If your member only contains English alphabetic characters, numeric digits, and a few special characters, almost any of the EBCDIC code pages will work in the iconv command. The page http://www.tachyonsoft.com/cpindex.htm contains a list of ibm code pages; I notice that 1bm-037 (the first in the list) includes Brazil; but so also does ibm-275. You could bring both pages up in separate browser windows and compare these; for points where characters are different, look at your data to see if any of those characters are different. Kinda' tedious, but doable. As an alternative, ask your systems programmers. Finally, just try it. Try it once with ibm-037 and once with ibm-275, even once with ibm-1047; use SuperC to compare the results
Re: Data conversion EBCDIC to ASCII
Claudio Marcio wrote: Well, this is my situation I have a member in a Dataset with EBCDIC data, I need to turn into ASCII data Which round dealing?? Regards, OK, Claudio, but there are still possibilities that are not clear: * If you need to have it in ascii to be viewed on a workstation, just access it with any 3270 emulator; that's automatic * You could then cut and paste from your emulator window into a text editor on your workstation and save it on your workstation; the version on your workstation will be ascii Of course, this is tedious for large files * You could FTP from the mainframe to the workstation as text; on your workstation it will be ascii; then FTP back to the mainframe as binary, then it will be ascii on your mainframe (hmmm, except for those nasty line-ends most ascii machines seem to love) * You could write a little program in Assembler, PL/I, COBOL, or C and do the conversion yourself; not too hard. What's your language of choice? * You could use z/OS UNIX: == oput '..zzz(member)' '/u/yourid/member' binary == omvs == iconv -f ibm-1047 -t iso8859-1 member member2 == exit == oget '/u/yourid/member2' '..zzz(member)' binary This presupposes 1) you have z/OS UNIX segment defined and your home directory is /u/yourid 2) the file is encoded in ibm-1047 Note that there are multiple ebcdic code pages; do you know which one is being used? Finally, I'm still curious as to how the ascii version is to be used. That might give us some clues as to how best to do the conversion. - Original Message - From: Scott Barry [EMAIL PROTECTED] Newsgroups: bit.listserv.ibm-main To: IBM-MAIN@BAMA.UA.EDU Sent: Saturday, September 20, 2008 10:31 PM Subject: Re: Data conversion EBCDIC to ASCII On Sat, 20 Sep 2008 22:20:11 -0300, Claudio Marcio [EMAIL PROTECTED] wrote: Hello, I'm using below camando: //INPUT DD P=SHR- EBCDIC MEMBER // OUTPUT DD x..zz(member2),DISP=(,CATLG,DELETE), - create new ASCII member in same dataset of the INPUT member i // DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=27920) //SYSTSIN DD * OCOPY INDD(xxx..zz(member)) OUTDD(xxx..zz(member2)) TEXT CONVERT((BPXFX311)) FROM1047 returns the following error message: IEF344I JOBCONV STEPCONV OUTPUT - ALLOCATION FAILED DUE TO DATA FACILITY SYSTEM IGD17045I SPACE NOT SPECIFIED FOR ALLOCATION OF DATA SET can you help me? Regards - Original Message - From: John McKown [EMAIL PROTECTED] Newsgroups: bit.listserv.ibm-main To: IBM-MAIN@BAMA.UA.EDU Sent: Saturday, September 20, 2008 12:46 AM Subject: Re: Data conversion EBCDIC to ASCII On Fri, 19 Sep 2008, Claudio Marcio wrote: Hello, How do I convert a member with data EBCDIC to ASCII in the TSO environment? thanks Claudio A bit more information, please. Are you meaning in ISPF edit? Or do you mean a TSO command processor to do it? That is, some command such as: E2A input.ebcdic.file output.ascii.file ? In the latter case, you could possibly use the OCOPY command. http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/BPXZA580 OCOPY INDD(EBCDIC) OUTDD(ASCII) TEXT CONVERT(BPXFX311) FROM1047 This translates from EBCDIC code page 1047 (C language, UNIX) to ASCII code page ISO8859-1. -- Q: What do theoretical physicists drink beer from? A: Ein Stein. Maranatha! John McKown Your parameters are inconsistent. You have OUTDD and INDD which are DD-related, not DSN. Also, you specify DISP=(,CATLG,DELETE) but no SPACE= parameter, which would be required so you can provide directory-blocks. I would recommend pre-allocating the PDS with all required parameters, and in a second step use DISP=OLD with the member name specified in the DSN= parameter. And, again, verify the proper syntax/specification of INDD(?) and OUTDD(?). Scott Barry SBBWorks, Inc. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- Kind regards, -Steve Comstock The Trainer's Friend, Inc. 303-393-8716 http://www.trainersfriend.com z/OS Application development made easier * Our classes include + How things work + Programming examples with realistic applications + Starter / skeleton code + Complete working programs + Useful utilities and subroutines + Tips and techniques == Check out the Trainer's Friend Store to purchase z/OS == == application developer
Re: Data conversion EBCDIC to ASCII
Hi, I use the system z / OS version V1R6 How I see if my directory is /u/ and my file is encoded in ibm-1047 in that System?? == oput '..zzz(member)' '/u/yourid/member' binary == omvs == iconv -f ibm-1047 -t iso8859-1 member member2 == exit == oget '/u/yourid/member2' '..zzz(member)' binary In main menu, i have a command line option - ( option number 6 ) the above commands run this route?? sorry, I´m from Brazil and maybe I put not it well for you. But, I hope solution this problem. Regards - Original Message - From: Steve Comstock [EMAIL PROTECTED] Newsgroups: bit.listserv.ibm-main To: IBM-MAIN@BAMA.UA.EDU Sent: Sunday, September 21, 2008 3:00 AM Subject: Re: Data conversion EBCDIC to ASCII Claudio Marcio wrote: Well, this is my situation I have a member in a Dataset with EBCDIC data, I need to turn into ASCII data Which round dealing?? Regards, OK, Claudio, but there are still possibilities that are not clear: * If you need to have it in ascii to be viewed on a workstation, just access it with any 3270 emulator; that's automatic * You could then cut and paste from your emulator window into a text editor on your workstation and save it on your workstation; the version on your workstation will be ascii Of course, this is tedious for large files * You could FTP from the mainframe to the workstation as text; on your workstation it will be ascii; then FTP back to the mainframe as binary, then it will be ascii on your mainframe (hmmm, except for those nasty line-ends most ascii machines seem to love) * You could write a little program in Assembler, PL/I, COBOL, or C and do the conversion yourself; not too hard. What's your language of choice? * You could use z/OS UNIX: == oput '..zzz(member)' '/u/yourid/member' binary == omvs == iconv -f ibm-1047 -t iso8859-1 member member2 == exit == oget '/u/yourid/member2' '..zzz(member)' binary This presupposes 1) you have z/OS UNIX segment defined and your home directory is /u/yourid 2) the file is encoded in ibm-1047 Note that there are multiple ebcdic code pages; do you know which one is being used? Finally, I'm still curious as to how the ascii version is to be used. That might give us some clues as to how best to do the conversion. - Original Message - From: Scott Barry [EMAIL PROTECTED] Newsgroups: bit.listserv.ibm-main To: IBM-MAIN@BAMA.UA.EDU Sent: Saturday, September 20, 2008 10:31 PM Subject: Re: Data conversion EBCDIC to ASCII On Sat, 20 Sep 2008 22:20:11 -0300, Claudio Marcio [EMAIL PROTECTED] wrote: Hello, I'm using below camando: //INPUT DD P=SHR- EBCDIC MEMBER // OUTPUT DD x..zz(member2),DISP=(,CATLG,DELETE), - create new ASCII member in same dataset of the INPUT member i // DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=27920) //SYSTSIN DD * OCOPY INDD(xxx..zz(member)) OUTDD(xxx..zz(member2)) TEXT CONVERT((BPXFX311)) FROM1047 returns the following error message: IEF344I JOBCONV STEPCONV OUTPUT - ALLOCATION FAILED DUE TO DATA FACILITY SYSTEM IGD17045I SPACE NOT SPECIFIED FOR ALLOCATION OF DATA SET can you help me? Regards - Original Message - From: John McKown [EMAIL PROTECTED] Newsgroups: bit.listserv.ibm-main To: IBM-MAIN@BAMA.UA.EDU Sent: Saturday, September 20, 2008 12:46 AM Subject: Re: Data conversion EBCDIC to ASCII On Fri, 19 Sep 2008, Claudio Marcio wrote: Hello, How do I convert a member with data EBCDIC to ASCII in the TSO environment? thanks Claudio A bit more information, please. Are you meaning in ISPF edit? Or do you mean a TSO command processor to do it? That is, some command such as: E2A input.ebcdic.file output.ascii.file ? In the latter case, you could possibly use the OCOPY command. http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/BPXZA580 OCOPY INDD(EBCDIC) OUTDD(ASCII) TEXT CONVERT(BPXFX311) FROM1047 This translates from EBCDIC code page 1047 (C language, UNIX) to ASCII code page ISO8859-1. -- Q: What do theoretical physicists drink beer from? A: Ein Stein. Maranatha! John McKown Your parameters are inconsistent. You have OUTDD and INDD which are DD-related, not DSN. Also, you specify DISP=(,CATLG,DELETE) but no SPACE= parameter, which would be required so you can provide directory-blocks. I would recommend pre-allocating the PDS with all required parameters, and in a second step use DISP=OLD with the member name specified in the DSN= parameter. And, again, verify the proper syntax/specification of INDD(?) and OUTDD(?). Scott Barry SBBWorks, Inc. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm
Re: Data conversion EBCDIC to ASCII
Claudio Marcio wrote: Hi, I use the system z / OS version V1R6 How I see if my directory is /u/ and my file is encoded in ibm-1047 in that System?? == oput '..zzz(member)' '/u/yourid/member' binary == omvs == iconv -f ibm-1047 -t iso8859-1 member member2 == exit == oget '/u/yourid/member2' '..zzz(member)' binary In main menu, i have a command line option - ( option number 6 ) the above commands run this route?? yes, all of these commands are issued from ISPF option 6 When you enter the omvs command, you are placed into UNIX; the next two commands are actually issued while you are in UNIX. So, go to ISPF 6 and enter the first two commands (oput and omvs) when you are in UNIX, issue == pwd this will display your current directory. if it is /u/ followed by your tso id in lower case, then you are good. It may be you are not set up to run under UNIX, however; if not you need to have your systems programmer add an omvs segment to your security profile (RACF, ACF2, Top Secret, any other). This is where you specify the home directory (and some other attributues). If you are not set up to run under UNIX, the omvs command will fail. the exit command leaves UNIX and returns to yout ISPF 6 command line to enter the oget command. I have tested this series of commands, and it does what you want, assuming the various parts for you running under UNIX are in place. As far as knowing what code page is used for a file, there really is no magic way. The default code page for z/OS is ibm-037, the default code page for the unix shell is ibm-1047. But these can be changed by systems people. In most cases, the various EBCDIC code pages are the same; it's only some special characters and some language-specific characters that have varying code points. If your member only contains English alphabetic characters, numeric digits, and a few special characters, almost any of the EBCDIC code pages will work in the iconv command. The page http://www.tachyonsoft.com/cpindex.htm contains a list of ibm code pages; I notice that 1bm-037 (the first in the list) includes Brazil; but so also does ibm-275. You could bring both pages up in separate browser windows and compare these; for points where characters are different, look at your data to see if any of those characters are different. Kinda' tedious, but doable. As an alternative, ask your systems programmers. Finally, just try it. Try it once with ibm-037 and once with ibm-275, even once with ibm-1047; use SuperC to compare the results. Good luck. sorry, I´m from Brazil and maybe I put not it well for you. But, I hope solution this problem. Regards - Original Message - From: Steve Comstock [EMAIL PROTECTED] Newsgroups: bit.listserv.ibm-main To: IBM-MAIN@BAMA.UA.EDU Sent: Sunday, September 21, 2008 3:00 AM Subject: Re: Data conversion EBCDIC to ASCII Claudio Marcio wrote: Well, this is my situation I have a member in a Dataset with EBCDIC data, I need to turn into ASCII data Which round dealing?? Regards, OK, Claudio, but there are still possibilities that are not clear: * If you need to have it in ascii to be viewed on a workstation, just access it with any 3270 emulator; that's automatic * You could then cut and paste from your emulator window into a text editor on your workstation and save it on your workstation; the version on your workstation will be ascii Of course, this is tedious for large files * You could FTP from the mainframe to the workstation as text; on your workstation it will be ascii; then FTP back to the mainframe as binary, then it will be ascii on your mainframe (hmmm, except for those nasty line-ends most ascii machines seem to love) * You could write a little program in Assembler, PL/I, COBOL, or C and do the conversion yourself; not too hard. What's your language of choice? * You could use z/OS UNIX: == oput '..zzz(member)' '/u/yourid/member' binary == omvs == iconv -f ibm-1047 -t iso8859-1 member member2 == exit == oget '/u/yourid/member2' '..zzz(member)' binary This presupposes 1) you have z/OS UNIX segment defined and your home directory is /u/yourid 2) the file is encoded in ibm-1047 Note that there are multiple ebcdic code pages; do you know which one is being used? Finally, I'm still curious as to how the ascii version is to be used. That might give us some clues as to how best to do the conversion. Kind regards, -Steve Comstock The Trainer's Friend, Inc. 303-393-8716 http://www.trainersfriend.com z/OS Application development made easier * Our classes include + How things work + Programming examples with realistic applications + Starter / skeleton code + Complete working programs + Useful utilities and subroutines + Tips and techniques == Check out the Trainer's Friend Store to purchase z/OS == == application
Re: Data conversion EBCDIC to ASCII
Hello, you may use the following REXX to do this job. AFAIK this program uses the german code table, but this may easily changed. /** REXX */ /*---*/ /*! FA#ASCII !*/ /*! FA#ASCII - Convert EBCDIC to ASCII (adding CR/LF) !*/ /*! Author: Kehr 06/09/2005 !*/ /*! Category: 1 !*/ /*---*/ /*! Last changed: 06/09/2005 !*/ /*---*/ /*! Description of changes: !*/ /*! 06/09/2005 First version !*/ /*/ say say Convert EBCDIC to ASCII - adding CR/LF V1.0.0 (06/09/2005) say /*---*/ /* Read input file */ /*---*/ EXECIO * DISKR SYSUT1 (STEM data. FINIS) /*---*/ nb = 0 do j = 1 to data.0 data1.j = translate(strip(data.j),ebc2asc()) !! 0d0ax nb = nb + length(data1.j) end /*---*/ EXECIO * DISKW SYSUT2 (STEM data1. FINIS) say ASCII001I data.0 records written to output file say ASCII001I nb bytes written to output file /*---*/ exit /*--*/ /*! p r o c e d u r e ebc2asc!*/ /*--*/ /*--- REXX - Konvertiertabelle EBCDIC - ASCII --*/ ebc2asc: return, /*0 1 2 3 4 5 6 7 8 9 A B C D E F */, 00 01 02 03 ec 09 ca 7f e2 d2 d3 0b 0c 0d 0e 0fx !!, 10 11 12 13 ef c5 08 cb 18 19 dc d8 1c 1d 1e 1fx !!, b7 b8 b9 bb c4 0a 17 1b cc cd cf d0 d1 05 06 07x !!, d9 da 16 dd de df e0 04 e3 e5 e9 eb b0 b1 9e 1ax !!, 20 ff 83 7b 85 a0 f2 86 87 a4 8e 2e 3c 28 2b 21x !!, 26 82 88 89 8a a1 8c 8b 8d 7e 9a 24 2a 29 3b 5ex !!, 2d 2f b2 5b b4 b5 b6 8f 80 a5 94 2c 25 5f 3e 3fx !!, ba 90 bc bd be f3 c0 c1 c2 60 3a 23 15 27 3d 22x !!, c3 61 62 63 64 65 66 67 68 69 ae af c6 c7 c8 f1x !!, f8 6a 6b 6c 6d 6e 6f 70 71 72 a6 a7 91 ce 92 a9x !!, e6 e1 73 74 75 76 77 78 79 7a ad a8 d4 d5 d6 d7x !!, 9b 9c 9d fa 9f 40 14 ac ab fc aa 7c e4 fe bf e7x !!, 84 41 42 43 44 45 46 47 48 49 e8 93 b3 95 a2 edx !!, 81 4a 4b 4c 4d 4e 4f 50 51 52 ee 96 7d 97 a3 98x !!, 99 f6 53 54 55 56 57 58 59 5a fd f5 5c f7 f0 f9x !!, 30 31 32 33 34 35 36 37 38 39 db fb 5d f4 ea c9x /*0 1 2 3 4 5 6 7 8 9 A B C D E F */ Claudio Marcio schrieb: Hello, How do I convert a member with data EBCDIC to ASCII in the TSO environment? thanks Claudio -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- ___ Freundliche Gruesse / Kind regards Dipl.Math. Juergen Kehr, IT Schulung Beratung, IT Education + Consulting Tel. +49-561-9528788 Fax +49-561-9528789 Mobil +49-172-5129389 ICQ 292-318-696 (JKehr) mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ___ -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII
On Fri, 19 Sep 2008 20:27:54 -0300, Claudio Marcio [EMAIL PROTECTED] wrote: Hello, How do I convert a member with data EBCDIC to ASCII in the TSO environment? You'll find lots of different ways in the archives. Via JCL, FTP, using z/OS UNIX, just to name a few. The best methods use the ICONV() service. I have been using this C++ utility: //JOBNAME JOB ... // //* SEE SYS1.CEE.SCEEPROC(EDCICONV) and C++ MANUALS * // //* EDCICONV --- INVOKE ICONV UTILITY TO CONVERT THE INPUT FILE FROM * //* THE SPECIFIED CODESET TO THE SPECIFIED CODESET. * // //* //EDCICONV EXEC PGM=EDCICONV, // PARM=('FROMCODE(IBM-037),TOCODE(ISO8859-1)') //* PARM=('FROMCODE(ISO8859-1),TOCODE(IBM-037)') //*STEPLIB DD DSNAME=SYS1.CEE.SCEERUN,DISP=SHR //SYSUT1DD DSNAME=EBCDIC.FILE,DISP=SHR //SYSUT2DD DSNAME=ASCII.FILE,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY Mark -- Mark Zelden Sr. Software and Systems Architect - z/OS Team Lead Zurich North America / Farmers Insurance Group - ZFUS G-ITO mailto:[EMAIL PROTECTED] z/OS Systems Programming expert at http://expertanswercenter.techtarget.com/ Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII
In a message dated 9/20/2008 9:38:44 A.M. Central Daylight Time, [EMAIL PROTECTED] writes: You'll find lots of different ways in the archives. Via JCL, FTP, using z/OS UNIX, just to name a few. The best methods use the ICONV() service. I have been using this C++ utility: Don't know what the 'end use' is? If all you want is to get it to PC just use WSA and it'll suck the host file to the PC. **Looking for simple solutions to your real-life financial challenges? Check out WalletPop for the latest news and information, tips and calculators. (http://www.walletpop.com/?NCID=emlcntuswall0001) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII
Hello, I'm using below camando: //INPUT DD P=SHR- EBCDIC MEMBER // OUTPUT DD DSN=xxx..zz(member2),DISP=(,CATLG,DELETE), - create new ASCII member in same dataset of the INPUT member i // DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=27920) //SYSTSIN DD * OCOPY INDD(xxx..zz(member)) OUTDD(xxx..zz(member2)) TEXT CONVERT((BPXFX311)) FROM1047 returns the following error message: IEF344I JOBCONV STEPCONV OUTPUT - ALLOCATION FAILED DUE TO DATA FACILITY SYSTEM IGD17045I SPACE NOT SPECIFIED FOR ALLOCATION OF DATA SET can you help me? Regards - Original Message - From: John McKown [EMAIL PROTECTED] Newsgroups: bit.listserv.ibm-main To: IBM-MAIN@BAMA.UA.EDU Sent: Saturday, September 20, 2008 12:46 AM Subject: Re: Data conversion EBCDIC to ASCII On Fri, 19 Sep 2008, Claudio Marcio wrote: Hello, How do I convert a member with data EBCDIC to ASCII in the TSO environment? thanks Claudio A bit more information, please. Are you meaning in ISPF edit? Or do you mean a TSO command processor to do it? That is, some command such as: E2A input.ebcdic.file output.ascii.file ? In the latter case, you could possibly use the OCOPY command. http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/BPXZA580 OCOPY INDD(EBCDIC) OUTDD(ASCII) TEXT CONVERT(BPXFX311) FROM1047 This translates from EBCDIC code page 1047 (C language, UNIX) to ASCII code page ISO8859-1. -- Q: What do theoretical physicists drink beer from? A: Ein Stein. Maranatha! John McKown -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII
On Sat, 20 Sep 2008 22:20:11 -0300, Claudio Marcio [EMAIL PROTECTED] wrote: Hello, I'm using below camando: //INPUT DD P=SHR- EBCDIC MEMBER // OUTPUT DD DSN=xxx..zz(member2),DISP=(,CATLG,DELETE), - create new ASCII member in same dataset of the INPUT member i // DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=27920) //SYSTSIN DD * OCOPY INDD(xxx..zz(member)) OUTDD(xxx..zz(member2)) TEXT CONVERT((BPXFX311)) FROM1047 returns the following error message: IEF344I JOBCONV STEPCONV OUTPUT - ALLOCATION FAILED DUE TO DATA FACILITY SYSTEM IGD17045I SPACE NOT SPECIFIED FOR ALLOCATION OF DATA SET can you help me? Regards - Original Message - From: John McKown [EMAIL PROTECTED] Newsgroups: bit.listserv.ibm-main To: IBM-MAIN@BAMA.UA.EDU Sent: Saturday, September 20, 2008 12:46 AM Subject: Re: Data conversion EBCDIC to ASCII On Fri, 19 Sep 2008, Claudio Marcio wrote: Hello, How do I convert a member with data EBCDIC to ASCII in the TSO environment? thanks Claudio A bit more information, please. Are you meaning in ISPF edit? Or do you mean a TSO command processor to do it? That is, some command such as: E2A input.ebcdic.file output.ascii.file ? In the latter case, you could possibly use the OCOPY command. http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/BPXZA580 OCOPY INDD(EBCDIC) OUTDD(ASCII) TEXT CONVERT(BPXFX311) FROM1047 This translates from EBCDIC code page 1047 (C language, UNIX) to ASCII code page ISO8859-1. -- Q: What do theoretical physicists drink beer from? A: Ein Stein. Maranatha! John McKown Your parameters are inconsistent. You have OUTDD and INDD which are DD-related, not DSN. Also, you specify DISP=(,CATLG,DELETE) but no SPACE= parameter, which would be required so you can provide directory-blocks. I would recommend pre-allocating the PDS with all required parameters, and in a second step use DISP=OLD with the member name specified in the DSN= parameter. And, again, verify the proper syntax/specification of INDD(?) and OUTDD(?). Scott Barry SBBWorks, Inc. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII
Well, this is my situation I have a member in a Dataset with EBCDIC data, I need to turn into ASCII data Which round dealing?? Regards, - Original Message - From: Scott Barry [EMAIL PROTECTED] Newsgroups: bit.listserv.ibm-main To: IBM-MAIN@BAMA.UA.EDU Sent: Saturday, September 20, 2008 10:31 PM Subject: Re: Data conversion EBCDIC to ASCII On Sat, 20 Sep 2008 22:20:11 -0300, Claudio Marcio [EMAIL PROTECTED] wrote: Hello, I'm using below camando: //INPUT DD P=SHR- EBCDIC MEMBER // OUTPUT DD x..zz(member2),DISP=(,CATLG,DELETE), - create new ASCII member in same dataset of the INPUT member i // DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=27920) //SYSTSIN DD * OCOPY INDD(xxx..zz(member)) OUTDD(xxx..zz(member2)) TEXT CONVERT((BPXFX311)) FROM1047 returns the following error message: IEF344I JOBCONV STEPCONV OUTPUT - ALLOCATION FAILED DUE TO DATA FACILITY SYSTEM IGD17045I SPACE NOT SPECIFIED FOR ALLOCATION OF DATA SET can you help me? Regards - Original Message - From: John McKown [EMAIL PROTECTED] Newsgroups: bit.listserv.ibm-main To: IBM-MAIN@BAMA.UA.EDU Sent: Saturday, September 20, 2008 12:46 AM Subject: Re: Data conversion EBCDIC to ASCII On Fri, 19 Sep 2008, Claudio Marcio wrote: Hello, How do I convert a member with data EBCDIC to ASCII in the TSO environment? thanks Claudio A bit more information, please. Are you meaning in ISPF edit? Or do you mean a TSO command processor to do it? That is, some command such as: E2A input.ebcdic.file output.ascii.file ? In the latter case, you could possibly use the OCOPY command. http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/BPXZA580 OCOPY INDD(EBCDIC) OUTDD(ASCII) TEXT CONVERT(BPXFX311) FROM1047 This translates from EBCDIC code page 1047 (C language, UNIX) to ASCII code page ISO8859-1. -- Q: What do theoretical physicists drink beer from? A: Ein Stein. Maranatha! John McKown Your parameters are inconsistent. You have OUTDD and INDD which are DD-related, not DSN. Also, you specify DISP=(,CATLG,DELETE) but no SPACE= parameter, which would be required so you can provide directory-blocks. I would recommend pre-allocating the PDS with all required parameters, and in a second step use DISP=OLD with the member name specified in the DSN= parameter. And, again, verify the proper syntax/specification of INDD(?) and OUTDD(?). Scott Barry SBBWorks, Inc. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Data conversion EBCDIC to ASCII
Hello, How do I convert a member with data EBCDIC to ASCII in the TSO environment? thanks Claudio -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII
On Fri, 19 Sep 2008 20:27:54 -0300, Claudio Marcio [EMAIL PROTECTED] wrote: Hello, How do I convert a member with data EBCDIC to ASCII in the TSO environment? thanks Claudio With your post, it is unclear how you intend to use the data. One option is to invoke FTP back to the localhost and perform a PUT command converting the local file to a new-named file, after issuing the ASCII command. Scott Barry SBBWorks, Inc. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Data conversion EBCDIC to ASCII
On Fri, 19 Sep 2008, Claudio Marcio wrote: Hello, How do I convert a member with data EBCDIC to ASCII in the TSO environment? thanks Claudio A bit more information, please. Are you meaning in ISPF edit? Or do you mean a TSO command processor to do it? That is, some command such as: E2A input.ebcdic.file output.ascii.file ? In the latter case, you could possibly use the OCOPY command. http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/BPXZA580 OCOPY INDD(EBCDIC) OUTDD(ASCII) TEXT CONVERT(BPXFX311) FROM1047 This translates from EBCDIC code page 1047 (C language, UNIX) to ASCII code page ISO8859-1. -- Q: What do theoretical physicists drink beer from? A: Ein Stein. Maranatha! John McKown -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html