Jim,
It seems to me that there may be a nomenclature problem here. What _I_ call
a "text file with binary data" is a binary file. It might be as simple as
inserting a "binmode ($fh)" after the "vmsopen". If that doesn't work, look
at the other vmsopen arguments.
Kicking it up a level, are you just trying to convert the RMS indexed files
to sequential files? If so, there are other ways to do it. Something like
$ copy nla0: ajfile-flat.dat
$ append ajfile.dat ajfile-flat.dat
might do it. The "append" will complain about different file organizations,
but I believe it will do the job.
$ type/output=ajfile-flat.dat ajfile.dat
might also work. If all else fails, or if these don't give you the file
organizations you need, you might want to read the help on "CONVERT/FDL="
(which converts any organization to any other, using the FDL file to say
what you want), and "ANALYZE/RMS/FDL" (run against a file organized the way
you want it, so that you don't have to learn how to write an FDL file.
Now, if your data warehouse isn't also written in COBOL, you may have
another problem: all that packed decimal data that nobody much but COBOL
understands, and that you (potentially) need to interpret. If you grovel
around on the net enough you can find the exact field layouts. This is a
_good_ job for Perl. The trick here is that if you use "unpack" with the
"H" (or "h", as the case may be) format effector, you can convert your
packed decimal to ASCII, almost: you'll have to handle the sign nybble (if
any) and insert the decimal point yourself.
Tom Wyant
This communication is for use by the intended recipient and contains
information that may be privileged, confidential or copyrighted under
applicable law. If you are not the intended recipient, you are hereby
formally notified that any use, copying or distribution of this e-mail,
in whole or in part, is strictly prohibited. Please notify the sender
by return e-mail and delete this e-mail from your system. Unless
explicitly and conspicuously designated as "E-Contract Intended",
this e-mail does not constitute a contract offer, a contract amendment,
or an acceptance of a contract offer. This e-mail does not constitute
a consent to the use of sender's contact information for direct marketing
purposes or for transfers of data to third parties.
Francais Deutsch Italiano Espanol Portugues Japanese Chinese Korean
http://www.DuPont.com/corp/email_disclaimer.html