Re: reading COMP-3 data on UNIX using microfocus
- From: "William M. Klein" <wmklein@xxxxxxxxxxxxxxxxx>
- Date: Tue, 05 Jun 2007 04:50:00 GMT
Micro Focus *does* (at least on Windows) have tools that will "intelligently"
convert files from EBCDIC to ASCII. You need to provide the tools with the
exact layout of the file - and if it has any redefinitions, then you need to be
able to "predict" which redefinition is used.
You, then, down-load the file in "binary" and convert only the "character" data
from EBCDIC to ASCII.
For more information on this Micro Focus utility, go to:
http://supportline.microfocus.com/documentation/books/mx30/mx30indx.htm
Find the book
"Administrators Guide" and open it up
Select
Chapter 4: File Conversion Utilities
and look at the information on:
"MDECONV"
* * * * * *
To the best of my knowledge, this is NOT a part of any of the Unix products.
However, if you contacted your Micro Focus sales, marketing, or technical
support people, they might be able to tell you how you could acquire (purchase?)
a copy for use with the Unix product.
--
Bill Klein
wmklein <at> ix.netcom.com
"kimi" <mraghu83@xxxxxxxxx> wrote in message
news:1180947696.994841.323310@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jun 3, 7:43 pm, Louis Krupp <lkr...@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
kimi wrote:
docdw...@xxxxxxxxx () wrote:
In article <1180874176.462134.117...@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
kimi <mragh...@xxxxxxxxx> wrote:
[snip]
I have a file with COMP-3 data on IBM mainframe.It is in a PS
file.
As a next step i FTP it to the UNIX environment ( Solaris
8.1).Also we have microfocus server express 4.0
installed in the UNIX.
After FTPing it in ascii mode i need to run a cobol program
which can read this COMP-3 data.
To compile and run the program we are using the microfocus
compiler.
The result of running the program is as below:Ding! Consider what happens when you ftp from one platform to another
Successfully reads the non-COMP data.
COMP-3 data is read as a junk.
while translating EBCDIC to ASCII. The transfer knows nothing about
fields, just about byte-by-byte translation.
The variable declaration in my cobol program is as follows:See above about 'the transfer knows nothing about fields'.
fs-abc S9(8) COMP-3.
fs-xyz 9(2).
FILLER X(73).
DD
Can you pls be more elaborate??
Suppose your record were declared
01 rec.
05 n pic 9(2) comp-3.
05 s pic x(1).
Suppose, in the original EBCDIC, n had the value 81, and s had the value
'a'. This is actually stored as hexadecimal '8181'.
When ftp translates this to ASCII, it does it a byte at a time, and
translates all EBCDIC a's to ASCII a's, so that now it is stored as
hexadecimal '6161'. s is fine, but n is now 61.
The best way to fix this is to copy the EBCDIC data to a record in which
n is declared "pic 9(2) display" and then ftp the file to your UNIX system.
Louis- Hide quoted text -
- Show quoted text -
yeah we have tried this solution. It seems to be working .
But we are looking for a solution on UNIX environment itself.
To be specific we are looking for a solution through microfocus
commands.
I wanted to know if any command can do the job for me in microfocus??
I read somewhere that if you use microfocus u dont have to make any
modifications to the program , u can just run the application and it
works.
.
- Follow-Ups:
- References:
- reading COMP-3 data on UNIX using microfocus
- From: kimi
- Re: reading COMP-3 data on UNIX using microfocus
- From:
- Re: reading COMP-3 data on UNIX using microfocus
- From: kimi
- Re: reading COMP-3 data on UNIX using microfocus
- From: Louis Krupp
- Re: reading COMP-3 data on UNIX using microfocus
- From: kimi
- reading COMP-3 data on UNIX using microfocus
- Prev by Date: Re: COBOL is Number One
- Next by Date: Re: reading COMP-3 data on UNIX using microfocus
- Previous by thread: Re: reading COMP-3 data on UNIX using microfocus
- Next by thread: Re: reading COMP-3 data on UNIX using microfocus
- Index(es):
Relevant Pages
|
|