ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how do i set up a Cobol Comp-3 data field in Excel? (https://www.excelbanter.com/excel-programming/339328-how-do-i-set-up-cobol-comp-3-data-field-excel.html)

mmarley50

how do i set up a Cobol Comp-3 data field in Excel?
 
I transfer a file from the mainframe to text. Several data fields are comp-3
(s9(13)v99). These compress data fields are not readable under Excel and/or
Access. What can I do to get them to numeric fields?

Dave Peterson

how do i set up a Cobol Comp-3 data field in Excel?
 
Any chance you could convert the numbers on the mainframe side?

IIRC, lots of FTPs from mainframe to pcs will translate characters when they do
the transfer (broken vertical bar becomes a vertical bar, for example.)

If you're unlucky enough to get a combination of in one of your bytes that does
that conversion, your data could be screwed up.



mmarley50 wrote:

I transfer a file from the mainframe to text. Several data fields are comp-3
(s9(13)v99). These compress data fields are not readable under Excel and/or
Access. What can I do to get them to numeric fields?


--

Dave Peterson

Dave Peterson

how do i set up a Cobol Comp-3 data field in Excel?
 
Tom Ogilvy responded in a different thread:

If you specify a binary transfer they shouldn't.

==========
I don't have access to a mainframe anymore, but IIRC, not all the text came
through correctly.

Am I mis-remembering?

Dave Peterson wrote:

Any chance you could convert the numbers on the mainframe side?

IIRC, lots of FTPs from mainframe to pcs will translate characters when they do
the transfer (broken vertical bar becomes a vertical bar, for example.)

If you're unlucky enough to get a combination of in one of your bytes that does
that conversion, your data could be screwed up.

mmarley50 wrote:

I transfer a file from the mainframe to text. Several data fields are comp-3
(s9(13)v99). These compress data fields are not readable under Excel and/or
Access. What can I do to get them to numeric fields?


--

Dave Peterson


--

Dave Peterson

Tushar Mehta

how do i set up a Cobol Comp-3 data field in Excel?
 
In article ,
says...
I transfer a file from the mainframe to text. Several data fields are comp-3
(s9(13)v99). These compress data fields are not readable under Excel and/or
Access. What can I do to get them to numeric fields?

No, the packed decimal fields are not readable by anything but COBOL!
For some options search google. You'll find several hits including
http://www.room42.com/store/computer..._decimal.shtml

Your best bet it would appear would be to do the translation with a
COBOL program on the mainframe.

As Dave implied a text transfer of the file will almost certainly
corrupt it. I imagine you could do a binary transfer, open the
transfered file as a binary file in a VB(A) program, and do the
translation that way but it would be a lot of work.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

David McRitchie

how do i set up a Cobol Comp-3 data field in Excel?
 
Packed Decimal (COBOL COMP-3) is not recognized on PC
or other ASCII machines, so you will you will have to convert them
to Picture strings in COBOL and preferably you have all positive
numbers.

Packed Decimal is part of the IBM 360 instruction set so it is
recognized in a variety of languages not just COBOL. Since the poster
mentioned COBOL it would most like be that the file layout has only
been defined in COBOL and certainly best handled in the same language
on a mainframe.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Tushar Mehta" wrote in message m...
In article ,
says...
I transfer a file from the mainframe to text. Several data fields are comp-3
(s9(13)v99). These compress data fields are not readable under Excel and/or
Access. What can I do to get them to numeric fields?

No, the packed decimal fields are not readable by anything but COBOL!
For some options search google. You'll find several hits including
http://www.room42.com/store/computer..._decimal.shtml

Your best bet it would appear would be to do the translation with a
COBOL program on the mainframe.

As Dave implied a text transfer of the file will almost certainly
corrupt it. I imagine you could do a binary transfer, open the
transfered file as a binary file in a VB(A) program, and do the
translation that way but it would be a lot of work.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions




Dave Peterson

how do i set up a Cobol Comp-3 data field in Excel?
 
I used to use a report writer program named EasyTrieve that could read packed
decimals. (It was a quick and easy report to convert those fields.)

You sure that only COBOL can read these fields -- not even Assembler <vbg?

Tushar Mehta wrote:

In article ,
says...
I transfer a file from the mainframe to text. Several data fields are comp-3
(s9(13)v99). These compress data fields are not readable under Excel and/or
Access. What can I do to get them to numeric fields?

No, the packed decimal fields are not readable by anything but COBOL!
For some options search google. You'll find several hits including
http://www.room42.com/store/computer..._decimal.shtml

Your best bet it would appear would be to do the translation with a
COBOL program on the mainframe.

As Dave implied a text transfer of the file will almost certainly
corrupt it. I imagine you could do a binary transfer, open the
transfered file as a binary file in a VB(A) program, and do the
translation that way but it would be a lot of work.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions


--

Dave Peterson

Tushar Mehta

how do i set up a Cobol Comp-3 data field in Excel?
 
I was afraid someone might call me on that "COBOL only" bit but I
figured my phrasing had more of an impact. {grin}

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
I used to use a report writer program named EasyTrieve that could read packed
decimals. (It was a quick and easy report to convert those fields.)

You sure that only COBOL can read these fields -- not even Assembler <vbg?

Tushar Mehta wrote:

In article ,
says...
I transfer a file from the mainframe to text. Several data fields are comp-3
(s9(13)v99). These compress data fields are not readable under Excel and/or
Access. What can I do to get them to numeric fields?

No, the packed decimal fields are not readable by anything but COBOL!
For some options search google. You'll find several hits including
http://www.room42.com/store/computer..._decimal.shtml

Your best bet it would appear would be to do the translation with a
COBOL program on the mainframe.

As Dave implied a text transfer of the file will almost certainly
corrupt it. I imagine you could do a binary transfer, open the
transfered file as a binary file in a VB(A) program, and do the
translation that way but it would be a lot of work.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions





All times are GMT +1. The time now is 03:46 AM.

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