May 15, 2014
Techniques for file copying, compressions
I need to submit a file to from an HP 3000 to my credit card processor, a file that is an 80-byte file. Before I submit it, I need to zip the file. I’m using the Posix shell and its zip program. I SFTP’d the file, but my vendor is not processing the file because it is supposedly 96 bytes long. If I unzip the file that I zipped, it becomes a bytestream file. I then check — by doing an FCOPY FROM=MYFILE;TO=;HEX;CHAR — and I see that no record exceeds 80 bytes. Why do they think it is an 96-byte file?
Barry Lake of Allegro replies
I would convert it to a bytestream file before zipping it
:tobyte.hpbin.sys "-at /SG2VER/PUB/LCAUTHOT /SOME/NEW/FILE"
Mark Ranft adds
I would try copying the file to an intermediate server. Zip it. And SFTP it. See if that provides better results.Tony Summers suggests there is good background instruction, to understand how MPE/iX files are different than those in Unix, at Robelle's MPE for Unix Users article.
I thought there was an option to FCOPY part of a record. If the record contains TODAY IS MONDAY and you want only columns 10-12, I thought there was an FCOPY subset option-- one that would result in just the characters in those positions (MON). Am I halucinating?
Francois Desrochiers replies
The SUBSET option is used to select records by record numbers or strings in certain columns, but you cannot select parts of records. It always works on complete records. You have to use other tools such as Suprtool, Qedit, Editor, Quad, or the Posix "cut" to extract columns.
Olav Kappert adds
You can also pipe the record into a variable and the parse whatever you want out.
Use our search engine to find 20 years
of HP 3000 news and articles
The comments to this entry are closed.