Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default 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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 903
Default 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





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting XP Excel spreadsheets from 2007 to Macintosh (MAC) comp Kia Excel Discussion (Misc queries) 1 September 25th 08 09:27 PM
*Hi- Urgent (but of course) I need a music cue sheet in excel format....(sample attached)......thanks for the help! - wsr-comp-cuesheet.pdf (0/1) [email protected] Excel Discussion (Misc queries) 2 January 16th 06 10:32 PM
*Hi- Urgent (but of course) I need a music cue sheet in excel format....(sample attached)......thanks for the help! - wsr-comp-cuesheet.pdf (1/1) [email protected] Excel Discussion (Misc queries) 0 January 16th 06 06:08 PM
saving the history of recently used excel documentsto another comp McRiggen Excel Discussion (Misc queries) 1 December 21st 05 12:36 AM
how do i query data from cobol to excel? barry Excel Discussion (Misc queries) 1 October 25th 05 01:31 AM


All times are GMT +1. The time now is 10:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"