Re: FTPing COMP-3 data from mainframe to UNIX



If you have (IBM) mainframe files that you need to transfer to an ASCII (or
Unicode) environment *and* the files include a mixture of "character" and "COMP"
(binary or Packed) fields, then you MUST use a tool for successful data sharing.

Micro Focus (and others) have such tools. They require that you have a complete
"file description". This may be a "copybook" for the file layout - but does
need to include all redefines both at the 01-level and lower levels. There also
must be a way of "determining" which layout is in "use" for each record.

If this is a "one-off" (single file or single program) then you certainly can
"do this yourself" (code a COBOL program to do it). Otherwise, you can look for
a "tool" to do it for you.

The bottom-line is that this "tool" must do one of two things:

1) Convert all numeric fields to USAGE DISPLAY SIGN IS SEPARATE
(then the conversion of the file is easy)
or
2) You need to transfer" in binary and have the tool "convert" only the
character data between EBCDIC and ASCII

P.S. Different COBOL compilers use different rules for how they handle signs of
packed fields even when running in ASCII mode. Micro Focus, for example, has
CHARSET(ASCII/EBCDIC) vs SIGN(ASCII/EBCDIC).

Finally, if you have a compiler (such as Micro Focus) that allows you to run
your ENTIRE application on the Unix/PC system in EBCDIC, then you may want to
consider just downloading your file in BINARY and running in EBCDIC on the
workstation. You won't be able to share such files (intelligently) with other
PC/Unix applications, but this may be the easiest way for some work to be done.

--
Bill Klein
wmklein <at> ix.netcom.com
"kimi" <mraghu83@xxxxxxxxx> wrote in message
news:1179986951.644733.282750@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
hi,

I am actually trying to ftp a PS file from mainframe to UNIX.

The contents of the PS file are data declared as S9(8) COMP-3 and
9(2).

When i ftp this file to UNIX in ASCII mode , i am able to read
the data declared as 9(2) as it
is but there is a erroneuos read as far as the COMP-3 data is
concerned.

When i ftp this file to UNIX in BINARY mode , i am able to read
the data declared as COMP-
3 as it is but there is a erroneuos read as far as the 9(2) data
is concerned.

The ftped data in UNIX is being read using a cobol program.
The cobol program is being compiled using the command "cob -iaPV
filename.cbl".
The cobol program is being run using the command "cobrun
filename.int".

The above commands are provided by microfocus.ie. the cobol
program is being executed
on a UNIX environment using MICRO FOCUS SERVER EXPRESS 4.0 SP2.

Pls let me know how i can read both the types of data
successfully.



.



Relevant Pages

  • 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: Newbie Question: end-of-line terminator in Forth?
    ... UNIX and Mac OS X end of line is LF ... LF/linefeed is a character from ancient teletypes. ... In ASCII, that code ... The late 60's Multics OS adopted this standard, ...
    (comp.lang.forth)
  • Re: FTPing COMP-3 data from mainframe to UNIX
    ... ASCII, *all* the data in each record are converted to ASCII, but that should ... not be done with COMP-3 data, explaining your problem with those fields. ... Convert all display data to ASCII on the mainframe (leaving the COMP-3 ... The cobol program is being compiled using the command "cob -iaPV ...
    (comp.lang.cobol)