ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Text Data Fields mixed with binary (Comp) and packed (Comp-3) data (https://www.excelbanter.com/excel-programming/422241-text-data-fields-mixed-binary-comp-packed-comp-3-data.html)

JEB

Text Data Fields mixed with binary (Comp) and packed (Comp-3) data
 
I have a 2046 byte record that I download from the mainframe to a ".txt"
file. The low order 1500 bytes of this file is purely text data. The first
746 bytes, however, contain a mixture of text, binary and packed data files
(Comp and Comp-3) fields. It appears that irregardless of the contents of
these files, the record length is shortened by the compression of this data
in the download process. Is there any way that I can download this file,
compensating for the loss of the compressed fields (don't need them anyway),
so I can parse and load the true text fields into an Excel Spreadsheet?

Thanking you all in advance...
--
John

Dave Peterson

Text Data Fields mixed with binary (Comp) and packed (Comp-3) data
 
If I had to do this, I would convert the data to plain old ASCII on the
mainframe. It would make life a lot simpler on the pc side.

And since the work has to be done somewhere, why not do it where it's easier --
on the mainframe.

JEB wrote:

I have a 2046 byte record that I download from the mainframe to a ".txt"
file. The low order 1500 bytes of this file is purely text data. The first
746 bytes, however, contain a mixture of text, binary and packed data files
(Comp and Comp-3) fields. It appears that irregardless of the contents of
these files, the record length is shortened by the compression of this data
in the download process. Is there any way that I can download this file,
compensating for the loss of the compressed fields (don't need them anyway),
so I can parse and load the true text fields into an Excel Spreadsheet?

Thanking you all in advance...
--
John


--

Dave Peterson

JEB

Text Data Fields mixed with binary (Comp) and packed (Comp-3)
 
David;
Thank you for your prompt response and insight. If it were possible to do
this on the mainframe I would, agreeing with you to take the simplist
solution. Unfortunately I'm not able to do that for a variety of reasons;
cost, time and crossing boundries only to name a few. I have an immediate
need for this information and cannot wait six months of BS to get it done.
Thank you again.
--
John


"Dave Peterson" wrote:

If I had to do this, I would convert the data to plain old ASCII on the
mainframe. It would make life a lot simpler on the pc side.

And since the work has to be done somewhere, why not do it where it's easier --
on the mainframe.

JEB wrote:

I have a 2046 byte record that I download from the mainframe to a ".txt"
file. The low order 1500 bytes of this file is purely text data. The first
746 bytes, however, contain a mixture of text, binary and packed data files
(Comp and Comp-3) fields. It appears that irregardless of the contents of
these files, the record length is shortened by the compression of this data
in the download process. Is there any way that I can download this file,
compensating for the loss of the compressed fields (don't need them anyway),
so I can parse and load the true text fields into an Excel Spreadsheet?

Thanking you all in advance...
--
John


--

Dave Peterson


JEB

Text Data Fields mixed with binary (Comp) and packed (Comp-3)
 
David;
Thank you. So long as I don't need to look at the binary fields, which I
don't, I figured out a way to deal with the Comp-3 fields using the sort
utility. It create a record longer than what I want and requires additional
mapping to my application, but it's there.

Thank you again for your insight.
--
John


"Dave Peterson" wrote:

Good luck.

I'm not sure if fixing the problem is possible once you bring it into the
worksheet. I wouldn't be surprised if some of those funny packed decimals come
into the worksheet cells as something different from what you want.

If I recall correctly, there are some programs that may do unwanted conversions
when you transfer the data from the mainframe to the pc.



JEB wrote:

David;
Thank you for your prompt response and insight. If it were possible to do
this on the mainframe I would, agreeing with you to take the simplist
solution. Unfortunately I'm not able to do that for a variety of reasons;
cost, time and crossing boundries only to name a few. I have an immediate
need for this information and cannot wait six months of BS to get it done.
Thank you again.
--
John

"Dave Peterson" wrote:

If I had to do this, I would convert the data to plain old ASCII on the
mainframe. It would make life a lot simpler on the pc side.

And since the work has to be done somewhere, why not do it where it's easier --
on the mainframe.

JEB wrote:

I have a 2046 byte record that I download from the mainframe to a ".txt"
file. The low order 1500 bytes of this file is purely text data. The first
746 bytes, however, contain a mixture of text, binary and packed data files
(Comp and Comp-3) fields. It appears that irregardless of the contents of
these files, the record length is shortened by the compression of this data
in the download process. Is there any way that I can download this file,
compensating for the loss of the compressed fields (don't need them anyway),
so I can parse and load the true text fields into an Excel Spreadsheet?

Thanking you all in advance...
--
John

--

Dave Peterson


--

Dave Peterson


Dave Peterson

Text Data Fields mixed with binary (Comp) and packed (Comp-3)
 
SyncSort?



JEB wrote:

David;
Thank you. So long as I don't need to look at the binary fields, which I
don't, I figured out a way to deal with the Comp-3 fields using the sort
utility. It create a record longer than what I want and requires additional
mapping to my application, but it's there.

Thank you again for your insight.
--
John

"Dave Peterson" wrote:

Good luck.

I'm not sure if fixing the problem is possible once you bring it into the
worksheet. I wouldn't be surprised if some of those funny packed decimals come
into the worksheet cells as something different from what you want.

If I recall correctly, there are some programs that may do unwanted conversions
when you transfer the data from the mainframe to the pc.



JEB wrote:

David;
Thank you for your prompt response and insight. If it were possible to do
this on the mainframe I would, agreeing with you to take the simplist
solution. Unfortunately I'm not able to do that for a variety of reasons;
cost, time and crossing boundries only to name a few. I have an immediate
need for this information and cannot wait six months of BS to get it done.
Thank you again.
--
John

"Dave Peterson" wrote:

If I had to do this, I would convert the data to plain old ASCII on the
mainframe. It would make life a lot simpler on the pc side.

And since the work has to be done somewhere, why not do it where it's easier --
on the mainframe.

JEB wrote:

I have a 2046 byte record that I download from the mainframe to a ".txt"
file. The low order 1500 bytes of this file is purely text data. The first
746 bytes, however, contain a mixture of text, binary and packed data files
(Comp and Comp-3) fields. It appears that irregardless of the contents of
these files, the record length is shortened by the compression of this data
in the download process. Is there any way that I can download this file,
compensating for the loss of the compressed fields (don't need them anyway),
so I can parse and load the true text fields into an Excel Spreadsheet?

Thanking you all in advance...
--
John

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com