Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Including a Cobol copybook in REXX program.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
Author Message
new2cobol

Active User


Joined: 04 Jan 2006
Posts: 70

PostPosted: Wed Feb 01, 2006 10:20 pm    Post subject: Including a Cobol copybook in REXX program.
Reply with quote

Is this possible? If yes, How?

I need to process a few files in REXX, I have the copybooks for those.
Back to top
View user's profile Send private message
References
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 1956
Location: Israel

PostPosted: Wed Feb 01, 2006 10:43 pm    Post subject:
Reply with quote

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
View user's profile Send private message
new2cobol

Active User


Joined: 04 Jan 2006
Posts: 70

PostPosted: Fri Feb 17, 2006 1:59 am    Post subject:
Reply with quote

Can you provide some guidelines for that? Like, how did you go about doing your NATURAL conversion?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 1956
Location: Israel

PostPosted: Fri Feb 17, 2006 12:00 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1