473,804 Members | 3,018 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C to Pro COBOL Problem - Bytes Shifted by 4

We have 'C' routine calls Pro COBOL routine...... Data passed back to
the C program is shifted by 4 bytes. We are trying to understand and
fix this.

p.s. COBOL to COBOL is working fine!

Any pointers you all can provide would be appreciated.
Thank You.

Kalpesh
Nov 14 '05 #1
4 1897
Kalpesh Parikh wrote:
We have 'C' routine calls Pro COBOL routine...... Data passed back to
the C program is shifted by 4 bytes. We are trying to understand and
fix this.
Ok.
p.s. COBOL to COBOL is working fine!
Great!
Any pointers you all can provide would be appreciated.
NULL
Thank You.


You're welcome.

Kalpesh,

Put yourself in the position of someone reading your message, just for a
second. Can you understand that first, your question has next to nothing
to do with the C language per se, and second, you provide so little
information that the reader would have to be psychic to understand your
problem and/or provide useful feedback?

Best regards,

Sidney

Nov 14 '05 #2
Kalpesh Parikh <pa*****@hotmai l.com> spoke thus:
We have 'C' routine calls Pro COBOL routine...... Data passed back to
the C program is shifted by 4 bytes. We are trying to understand and
fix this.


(Consider this a favor.)

Your post is off-topic for comp.lang.c. Please visit

http://www.csclub.uwaterloo.ca/u/dj3...lc-welcome.txt
http://www.eskimo.com/~scs/C-faq/top.html
http://benpfaff.org/writings/clc/off-topic.html

for posting guidelines and frequently asked questions. Thank you.

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
Nov 14 '05 #3
Kalpesh Parikh wrote:
We have 'C' routine calls Pro COBOL routine......
Data passed back to the C program is shifted by 4 bytes.
We are trying to understand and fix this.

p.s. COBOL to COBOL is working fine!
Of course it is.
Any pointers you all can provide would be appreciated.


We are *very* smart but *not* clairvoyant.

Show us your declaration of the COBOL subroutine in the C program.
Show us how you invoke the COBOL subroutine in the C program.
Show us the declarations/definitions of *all* of the actual arguments
that you pass to the COBOL subroutine.

Nov 14 '05 #4
"E. Robert Tisdale" wrote:

Kalpesh Parikh wrote:
We have 'C' routine calls Pro COBOL routine......
Data passed back to the C program is shifted by 4 bytes.
We are trying to understand and fix this.

p.s. COBOL to COBOL is working fine!


Of course it is.
Any pointers you all can provide would be appreciated.


We are *very* smart but *not* clairvoyant.

Show us your declaration of the COBOL subroutine in the C program.
Show us how you invoke the COBOL subroutine in the C program.
Show us the declarations/definitions of *all* of the actual arguments
that you pass to the COBOL subroutine.


No, don't show us any of that. Some of us are not so smart and
encourage off-topic postings, while giving other faulty advice and
trolling. Find a newsgroup that deals with your specific system
instead.

--
Chuck F (cb********@yah oo.com) (cb********@wor ldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home .att.net> USE worldnet address!
Nov 14 '05 #5

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

Similar topics

25
6759
by: TK | last post by:
I'm used to programming in c or c++ in which my problem is simple. I want to be able to enter a value on a page (like 3.2), and then read it as a 32-bit float and break it into it's individual bytes. I've tried using bitwise operators, but they seem to convert the value into an integer first, and i've tried using the toString() method to convert it into a hex value so i can parse it, but that also seems to first convert it into an...
30
2799
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 if anyone from the group could give me some advice on how to respond / if they had been in a similar position. Any help appreciated, Thanks in advance,
6
3798
by: KevinD | last post by:
assumption: I am new to C and old to COBOL I have been reading a lot (self teaching) but something is not sinking in with respect to reading a simple file - one record at a time. Using C, I am trying to read a flatfile. In COBOL, my simple file layout and READ statement would look like below. Question: what is the standard, simple coding convention for reading in a flatfile - one record at a time?? SCANF does not work because of...
25
7995
by: Allan Rydberg | last post by:
hi i'm trying to shift a double, but i'm getting the error message '>>' illegal, left operand double. althought that the manpages say, '>>' and '<<' can be applied for int's only, i was able to use the shift operator on unsigned longs without any problems. does anyone know how to do this properly?
12
5195
by: J. G. | last post by:
I'm looking at rewriting some stand-alone Pro*COBOL applications that read flat files and spit out some reports. Is there any way to mimic COBOL's ability to read lines from a flat file into a data structure? I'm hoping C# has a way to define a data structure that I can read the lines into so that they can be easily manipulated. Any advice would be greatly appreciated.
11
3764
by: MPF | last post by:
Alas, I surrender... In a file from a COBOL dump, which is in ASCII, one of the fields is defined as S9(9) V99 Value +0. The value in this location is 0000018922D, which according to the author of the source, translates to 00000189224. How can this be translated via .Net? I've tried StreamReader and trying to convert everything to bytes, but I end up with the same value (0000018922D).
2
1434
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! **************************************************************************************************** Original Question: -------------------- Has anyone called a COBOL subroutine using COBOL CALL from a COBOL/DB2
4
4738
by: Lee Crabtree | last post by:
I need to shift all of the values in a byte array by more than 8 bits, meaning that values should flow from one byte to another. Since I don't know in advance how many bits will be shifting, I can't do something easy like putting the bytes into a long or uint and shifting that. Let me give an example: If I want to shift this: 10010110 00001101
34
13925
by: john | last post by:
If I have a 32 bit unsigned int that is in the wrong byte order, how can I convert it? For example, if have a number 0x090a0b0c how can I reverse this to 0x0c0b0a09 ? Thanks, -John
0
9704
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10562
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10319
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10070
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9132
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4282
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2978
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.