View previous topic :: View next topic |
Author |
Message |
rnanavaty Beginner
Joined: 12 Apr 2006 Posts: 29 Topics: 20
|
Posted: Tue Mar 20, 2007 7:04 am Post subject: Assembler to COBOL conversion |
|
|
We are converting one of our project module from assembly to cobol. In assembly we have
1) Files which contains hexadecimal values like 'F0045AD....'
2)AND and OR operation on bits are present
How to deal with them? If any one of you came across such type of assignment, please provide your valuable suggestions. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
shekar123 Advanced
Joined: 22 Jul 2005 Posts: 528 Topics: 90 Location: Bangalore India
|
Posted: Tue Mar 20, 2007 12:44 pm Post subject: |
|
|
Kolusu,
Can you please share any sample examples if you can about usage of Bit Operators in COBOL ? _________________ Shekar
Grow Technically |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Tue Mar 20, 2007 3:34 pm Post subject: |
|
|
Why not just search Google for CEESITST? It turns up lots of examples. |
|
Back to top |
|
 |
rnanavaty Beginner
Joined: 12 Apr 2006 Posts: 29 Topics: 20
|
Posted: Wed Mar 21, 2007 1:46 am Post subject: |
|
|
Thanx for your Input Kolusu. Bit handling is clear now.
But still I am not very clear about handling hex values in COBOL. If a physical seq. file contains 'FA1023......' as emp no. and salary for example then do we need to write a seprate program to convert those values or we can directly use this file???? |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed Mar 21, 2007 7:13 am Post subject: |
|
|
rnanavaty,
Is your input in hex if so search this forum for converting hex into character using cobol
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Fri Mar 23, 2007 8:38 am Post subject: |
|
|
One of the hardest things to tackle in Assembler is the hex "part". Is a given hex string really data ? Or, an address location ?
Also, rnanavaty, you want to handle HEX data in COBOL. What is NOT hex on mainframe or on any other computer ? If you saw a hex string in a EBCDIC file as X'C3C1E3' would you call it hex data when it is actually just the string 'CAT' ? _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
 |
rnanavaty Beginner
Joined: 12 Apr 2006 Posts: 29 Topics: 20
|
Posted: Fri Mar 30, 2007 5:43 am Post subject: |
|
|
Yes Cogito-Ergo-Sum
You are correct but we are involved in an RE-engineering type of project. So as I know that we can have have value equivalent to HEX string but the question is " Do we need to write routine to convert any PS file from hex to EBCDIC or we can directly use use that file in cobol????????" |
|
Back to top |
|
 |
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Fri Mar 30, 2007 6:48 am Post subject: |
|
|
I repeat. Quote: | If you saw a hex string in a EBCDIC file as X'C3C1E3' would you call it hex data when it is actually just the string 'CAT' ? |
If this is still not clear, let us know the sample input and output you expect. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Fri Mar 30, 2007 7:00 am Post subject: |
|
|
hex refers to the base 16 number system (0-F). EBCDIC and ASCII are code schemes used to organize all the different print or graphic chars by hex values. you need to determine what the reference by the assembler program to 'hex' values means. Maybe the asm pgm is indexing thru all the char in the input file string.
more than likely, these are not acsii encoded files. I would go thru the dsect used to define the input-file and determine how you have to map your cobol record definition. Based on what the asm module handles each file, you can determine if it is char, numeric - and if packed-decimal, binary or display, or a table counter or a pointer of some type. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
|
|