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 00001 of 00003 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 'xxxx.yyyy.zzz(member)' '/u/yourid/member' binary

in 'xxxxx.yyyy.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 'xxxx.yyyy.zzz(member)' '/u/yourid/member' binary
   ==> omvs

   ==> iconv -f ibm-1047 -t iso8859-1 member > member2
   ==> exit

   ==> oget '/u/yourid/member2' 'xxxx.yyyy.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 'xxxx.yyyy.zzz(member)' '/u/yourid/member' binary
   ==> omvs

   ==> iconv -f ibm-1047 -t iso8859-1 member > member2
   ==> exit

   ==> oget '/u/yourid/member2' 'xxxx.yyyy.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 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

Reply via email to