Consultor Eletrônico



Kbase P120496: Using INPUT THROUGH to read data from gzip utility corrupts first chunk of data
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   16/11/2006
Status: Unverified

FACT(s) (Environment):

Progress 9.x
OpenEdge 10.x
Sun Solaris SPARC

SYMPTOM(s):

Using INPUT THROUGH to read data from gzip utility

Reading data into MEMPTR

Writing data from MEMPTR back to disk file

Data being read out of zip file is an XML document

Chunk of data from beginning of XML document is missing

CAUSE:

The INPUT THROUGH statement was invoking gzip -dc SomeZipFile and some binary data was being displayed before the real file

FIX:

Change the code to invoke gzip with the -dca parameter instead of -dc. The 'a' tells gzip to dump in ASCII mode