Re: FTPing COMP-3 data from mainframe to UNIX
- From: "William M. Klein" <wmklein@xxxxxxxxxxxxxxxxx>
- Date: Wed, 30 May 2007 19:33:36 GMT
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.
.
- References:
- FTPing COMP-3 data from mainframe to UNIX
- From: kimi
- FTPing COMP-3 data from mainframe to UNIX
- Prev by Date: Re: Setting A Hex Value in COBOL
- Next by Date: Re: Setting A Hex Value in COBOL
- Previous by thread: FTPing COMP-3 data from mainframe to UNIX
- Next by thread: FTPing COMP-3 data from mainframe to UNIX
- Index(es):
Relevant Pages
|