[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Packed Fields



Eric,

It seems that it may not be possible to do this using SQR.

We developed an SQC that would create packed fields by doing a character
by character translation.  This part worked, but the SQR itself would
interpret
on the individual values as an end of record indicator and would write the
record short.   My organization contacted the software vendor (then MITI)
and
they admitted the bug but said that it wasn't high on their list to be
fixed.

The incorrect character that SQR incorrectly interprets as an end of record
indicator
in a packed field is a binary "15".  So a dollar packed field with $1.50 in
it or
a whole number field with 150, etc. would cause this condition.

The easiest way for us was to develop a program on the mainframe to do the
conversion.

There MAY be a way to do this however...
If you run the SQR on the client, that would take care of the EOR problem I
believe.
But, it would produce a new problem, which is that you would have to send
the file to the mainframe in binary mode, which would mean that all of the
character fields would be garbage on the mainframe.  However, you may be
able
to get around that by creating a couple of routines that would translate
from ASCII to EBCDIC.

If anyone else has any input on this subject, please add to it.  I would
like to know if
ASCII to EBCDIC/Packed Comp-3 is possible for the mainframe using SQR.

Michael K. Lee
The Application Group, Inc.
mlee@appgroup.com






ej.gentz@HOSP.WISC.EDU on 04/01/98 06:44:38 AM

Please respond to SQR-USERS@USA.NET

To:   SQR-USERS@list.iex.net
cc:    (bcc: Michael Lee/Application Group)
Subject:  Packed Fields




Hi,
I need to write an interface to one of our state agencies. Their format
requires packed fields. I am wondering if this is possible to do within
SQR.
Thank you in advance.
Eric

Eric Gentz                              Interested in a real operating
system?
UW Hospital & Clinics             <http://www.apple.com>
610 N. Whitney Way               Because HAL doesn't run Windows 95.
Madison, WI 53705                Join the Mac Evangelist.
608-263-9345                      <http://www.evangelist.macaddict.com>
ej.gentz@hosp.wisc.edu
--------------------------------------
"You can twist perceptions, but reality won't budge."   -- Neal Peart
"Good morning, doctors. I have taken the liberty of removing Windows 95
from my hard drive." - Hal