473,396 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Cobol to .Net

No Cobol.Net yet? Wha?!?

Anywho, hope someone is familiar enough with Cobol to help me out here. I
have some files written by COBOL applications that contain COMP-3 fields (on
a mainframe) that I ftp up to a network folder for processing in .Net.
Anyone know if it's possible (and how) to convert those COMP-3 (PIC S9(5)V99
COMP-3, for example) to a numeric of type double/single/et cetera?

Hope so, as of now, I'm writing all the fix-it cob programs to convert on
the mainframe before the ftp. If there is a .Net solution, that would be so
much easier.

Thanks,

Mythran
Nov 21 '05 #1
7 1879
Mythran wrote:
No Cobol.Net yet? Wha?!?

Anywho, hope someone is familiar enough with Cobol to help me out here. I
have some files written by COBOL applications that contain COMP-3 fields (on
a mainframe) that I ftp up to a network folder for processing in .Net.
Anyone know if it's possible (and how) to convert those COMP-3 (PIC S9(5)V99
COMP-3, for example) to a numeric of type double/single/et cetera?

Hope so, as of now, I'm writing all the fix-it cob programs to convert on
the mainframe before the ftp. If there is a .Net solution, that would be so
much easier.
There is, though I don't really know anything about it.
http://www.apress.com/book/bookDisplay.html?bID=112

Thanks,

Mythran

Nov 21 '05 #2
Never used it and it's been many moons since I used COBOL bu there is Tiny
Cobol on source forge. It might contian some functions for conveting the
COMP-3 fields.

http://tiny-cobol.sourceforge.net/index.php

regards,
John
"Mythran" <ki********@hotmail.comREMOVETRAIL> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
No Cobol.Net yet? Wha?!?

Anywho, hope someone is familiar enough with Cobol to help me out here. I
have some files written by COBOL applications that contain COMP-3 fields
(on a mainframe) that I ftp up to a network folder for processing in .Net.
Anyone know if it's possible (and how) to convert those COMP-3 (PIC
S9(5)V99 COMP-3, for example) to a numeric of type double/single/et
cetera?

Hope so, as of now, I'm writing all the fix-it cob programs to convert on
the mainframe before the ftp. If there is a .Net solution, that would be
so much easier.

Thanks,

Mythran

Nov 21 '05 #3
there is COBOL.NET its made by Fujitsu
"Frank Rizzo" <no**@none.com> wrote in message
news:eJ**************@TK2MSFTNGP10.phx.gbl...
Mythran wrote:
No Cobol.Net yet? Wha?!?

Anywho, hope someone is familiar enough with Cobol to help me out here.
I have some files written by COBOL applications that contain COMP-3
fields (on a mainframe) that I ftp up to a network folder for processing
in .Net. Anyone know if it's possible (and how) to convert those COMP-3
(PIC S9(5)V99 COMP-3, for example) to a numeric of type double/single/et
cetera?

Hope so, as of now, I'm writing all the fix-it cob programs to convert on
the mainframe before the ftp. If there is a .Net solution, that would be
so much easier.


There is, though I don't really know anything about it.
http://www.apress.com/book/bookDisplay.html?bID=112

Thanks,

Mythran


Nov 21 '05 #4
Here there is a good description of the COMP-3 fields:
http://www.discinterchange.com/TechT...d_fields_.html

It looks like it is a "packed" decimal representation: every byte contains
two decimal digits. The last byte contains the sign.

An unchecked function to convert a buffer may be this:
(Note that OutlookExpress does not compile this :-))

function PackedToDecimal(buffer() as byte) as decimal
dim result as decimal = 0
dim i as integer
dim b as byte
for i = 0 to buffer.length - 2
b = buffer(i)
result += (b and (&HF)) + ((b >> 4) * 10)
next
b = buffer(i)
r +=((b >> 4) * 10)
dim s as byte = (b and &HF)
if s = &HD Then
result = -result
end if
return r
end function

You will have to divide the result if it contains decimal digits.
Best Regards,
Alejandro Lapeyre

"Mythran" <ki********@hotmail.comREMOVETRAIL> escribió en el mensaje
news:%2****************@tk2msftngp13.phx.gbl...
No Cobol.Net yet? Wha?!?

Anywho, hope someone is familiar enough with Cobol to help me out here. I
have some files written by COBOL applications that contain COMP-3 fields
(on a mainframe) that I ftp up to a network folder for processing in .Net.
Anyone know if it's possible (and how) to convert those COMP-3 (PIC
S9(5)V99 COMP-3, for example) to a numeric of type double/single/et
cetera?

Hope so, as of now, I'm writing all the fix-it cob programs to convert on
the mainframe before the ftp. If there is a .Net solution, that would be
so much easier.

Thanks,

Mythran

Nov 21 '05 #5
Mythran,

As far as I remember me is for you problem that every cobol compiler can use
other formats for Comp-3

It depends on the platform the program is compiled for. By instance the
sample you saw is as far as I remember me typical for IBM EBCDIC platforms.

However although a lot of people are thinking that, is not the only platform
where Cobol is used. There where at least two developments of Cobol used on
the PC's, which are sold by different vendors and have got the names from
those vendors. Because of the fact that the PC does not use EBCDIC you can
understand that the format on that alone because that is not the same as on
an IBM computer.

Therefore I would in your situation investigate what format is made. With
first starting on what platform the Cobol is used.

Not much, however I hope it helps,

Cor
Nov 21 '05 #6

"Cor Ligthert" <no************@planet.nl> wrote in message
news:uG**************@tk2msftngp13.phx.gbl...
Mythran,

As far as I remember me is for you problem that every cobol compiler can
use other formats for Comp-3

It depends on the platform the program is compiled for. By instance the
sample you saw is as far as I remember me typical for IBM EBCDIC
platforms.

However although a lot of people are thinking that, is not the only
platform where Cobol is used. There where at least two developments of
Cobol used on the PC's, which are sold by different vendors and have got
the names from those vendors. Because of the fact that the PC does not use
EBCDIC you can understand that the format on that alone because that is
not the same as on an IBM computer.

Therefore I would in your situation investigate what format is made. With
first starting on what platform the Cobol is used.

Not much, however I hope it helps,

Cor


Yeah, I understand. We have found a way to convert by sending the file from
the mainframe to the network folder via ftp in binary mode. That gives us a
binary format in ebcdic. Now I can manually uncompress all fields that are
packed and then convert all numeric data and then convert the text (not
including controls characters). This will give us what we need. So, just
gotta create the .Net assemblies for doing this :)

Thanks for everyone's insights.

Mythran
Nov 21 '05 #7
Mythran,

I don't if it helps, however in this newsgroup has in my opinion Jay given
the most complete answer on your question now I know it is EBCDIC. I give
you the full thread because there is more interesting in that.

http://groups-beta.google.com/group/...bbc3c3c7ffac33

You never know how it helps,

Cor
Nov 21 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Batista, Facundo | last post by:
People: I'm trying to convert my father from using COBOL to Python, :) One difficult thing we stuck into is how to read, from python, files written with COBOL. Do you know a module that...
2
by: Kalpana Shridhar | last post by:
I am on a project where I am converting COBOL to C++ on the mainframe. I am new to COBOL and have a lot of questions - any websites or any suggestions from experienced people will be really...
242
by: James Cameron | last post by:
Hi I'm developing a program and the client is worried about future reuse of the code. Say 5, 10, 15 years down the road. This will be a major factor in selecting the development language. Any...
3
by: KLomax | last post by:
I work at a small company that has custom software written in cobol. This software performs financial payment processing. There are about 300 programs with I’m guessing 1M+ lines of code. The...
30
by: Stuart Turner | last post by:
Hi Everyone, I'm working hard trying to get Python 'accepted' in the organisation I work for. I'm making some good in-roads. One chap sent me the text below on his views of Python. I wondered...
5
by: hpy_awad | last post by:
can cobol read binary data written by fprintf (C function) ?
13
by: EricJ | last post by:
hi i need to access cobol data files from .net, the files have no or .vix extention (i think thats a acucobol or something like that) (/me has completely no experience in cobol) i heard that...
2
by: singlal | last post by:
Hi, my question was not getting any attention because it moved to 2nd page; so posting it again. Sorry for any inconvenience but I need to get it resolved fast. Need your help! ...
15
by: dm1608 | last post by:
We have a number of COBOL programs, and some were currently developing, that simply read TEXT based reports and scrap the reports for various information. I'm curious to know if anyone has...
0
by: cobug | last post by:
Dear COBOL Users, Articles are being sought for the COBOL User Groups (COBUG) newsletters. Will you help us in our efforts to provide newsletters for the COBOL community at large? The...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.