|
|
| Author |
Message |
new2cobol
Active User
Joined: 04 Jan 2006 Posts: 70
|
|
|
|
Is this possible? If yes, How?
I need to process a few files in REXX, I have the copybooks for those. |
|
| Back to top |
|
 |
References
|
|
 |
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 1973 Location: Israel
|
|
|
|
You can't use COBOL copybooks within REXX, as both lagnuages interpret and process data types differently. In addition, COBOL variables are declared, while in REXX you dont have a declaration option.
However, it would be nice to write a converter from COBOL variables to REXX. I did it once with NATURAL definitions.
O. |
|
| Back to top |
|
 |
new2cobol
Active User
Joined: 04 Jan 2006 Posts: 70
|
|
|
|
| Can you provide some guidelines for that? Like, how did you go about doing your NATURAL conversion? |
|
| Back to top |
|
 |
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 1973 Location: Israel
|
|
|
|
Well, the first step was to read all the relevant documentation of the vendor (Software AG). From that - I was mostly concentrating in the syntax of the data definition blocks.
My next step was to read books about parsing and compiling. This info gave me a way to understand how to write a 'mini-parser' for the NATURAL data definition block. By the way, the book 'Compilers' by Alfred Aho was my favorite.
The next step was the writing work. I decided to write it in REXX, since it's the best language I know to handle strings on the mainframe.
Unfortunatelly, I can't share the code here, as it was written as a part of project we made for an American customer, so now it's the customer's property.
O. |
|
| Back to top |
|
 |
|
|