Re: reading COMP-3 data on UNIX using microfocus



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:
Successfully reads the non-COMP data.
COMP-3 data is read as a junk.
Ding! Consider what happens when you ftp from one platform to another
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:
fs-abc S9(8) COMP-3.
fs-xyz 9(2).
FILLER X(73).
See above about 'the transfer knows nothing about fields'.

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.



.



Relevant Pages

  • Re: reading COMP-3 data on UNIX using microfocus
    ... convert files from EBCDIC to ASCII. ... To the best of my knowledge, this is NOT a part of any of the Unix products. ... To compile and run the program we are using the microfocus ... COMP-3 data is read as a junk. ...
    (comp.lang.cobol)
  • Re: Data conversion EBCDIC to ASCII
    ... When you enter the omvs command, you are placed into UNIX; ... Data conversion EBCDIC to ASCII ... window into a text editor on your workstation ...
    (bit.listserv.ibm-main)
  • Re: OK, stupid question about picture managment programs...
    ... >I wrote a database program in 1984, all using unix shell scripts ... >and creating a set of ascii files that get searched linearly. ... I'm no database administrator, but I suspect that you are vastly ...
    (rec.photo.digital)
  • Re: FTP with LF instead of CRLF from a Unix client
    ... FTP with LF instead of CRLF from a Unix client ... ASCII) instead of Carriage Return/Line Feed (CRLF - x'0D0A' ASCII). ...
    (bit.listserv.ibm-main)
  • Re: FTPing COMP-3 data from mainframe to UNIX
    ... If you have mainframe files that you need to transfer to an ASCII (or ... Micro Focus have such tools. ... I am actually trying to ftp a PS file from mainframe to UNIX. ... The ftped data in UNIX is being read using a cobol program. ...
    (comp.lang.cobol)