MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem Statament: Convert PL/I to Cobol

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
lenovo
Beginner


Joined: 27 Nov 2008
Posts: 31
Topics: 9
Location: India

PostPosted: Tue Nov 10, 2009 8:59 am    Post subject: Problem Statament: Convert PL/I to Cobol Reply with quote

Hi,
I have a file whose record are like a normal copybook records.
Code:
     
 1 WS-GRP,                            /* first record*/
      2 WS-A1      char(8),          /* second record*/
      2 WS-A2      fixed binary(31);  /* third record*/


Now the problem is I want to convert the above file in PL/I to its equivalent COBOL part. i.e. comma(,) to replaced with dot(.). The PIC clause to be added. The attributes like fixed binary to be converted to its COBOL equivalent.
Can you please please suggest how this can be possible. Or I need to write a program for this.

Kindly Suggest.
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue Nov 10, 2009 9:14 am    Post subject: Reply with quote

http://209.85.129.132/search?q=cache:BIjlR5SoxV4J:www.thefreelibrary.com/ERNST%2B%26%2BYOUNG%2BRE%2BPRODUCTS%2BANNOUNCES%2BCLEOPATRA%2BFOR%2BPL%252FI%2BTO%2BCOBOL...-a018058112+Convert+PL/I+to+Cobol&cd=5&hl=en&ct=clnk&gl=en

you can google and find other responses.

i imagine somebody at IBM has something. getting it though, might be like pulling teeth.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
lenovo
Beginner


Joined: 27 Nov 2008
Posts: 31
Topics: 9
Location: India

PostPosted: Wed Nov 11, 2009 6:50 am    Post subject: Reply with quote

dbzTHEdinosauer,
Thanks for the effort.
I have checked google but nothing fruitful.
Can you suggest from where I should start.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12368
Topics: 75
Location: San Jose

PostPosted: Wed Nov 11, 2009 11:16 am    Post subject: Reply with quote

lenovo,

try these


http://findarticles.com/p/articles/mi_m0EIN/is_1996_March_6/ai_18058112/?tag=content-inner;col1

http://www.cornerstone.nl/ProductsServices/AnytoanyConversionMigration/tabid/568/language/en-US/Default.aspx

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
lenovo
Beginner


Joined: 27 Nov 2008
Posts: 31
Topics: 9
Location: India

PostPosted: Wed Nov 11, 2009 11:52 am    Post subject: Reply with quote

Thanks kolusu,
The sites mention there product for the conversion.
Is it possible to write a program for the conversion?
Please suggest.
Back to top
View user's profile Send private message
prino
Banned


Joined: 01 Feb 2007
Posts: 45
Topics: 5
Location: Oostende

PostPosted: Wed Nov 11, 2009 12:20 pm    Post subject: Reply with quote

lenovo wrote:
Thanks kolusu,
The sites mention there product for the conversion.
Is it possible to write a program for the conversion?


Of course, if you have enough time you can do so.

However, be aware that there are utter sithloads of PL/I constructions that cannot be translated to COBOL!
Back to top
View user's profile Send private message
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Wed Nov 11, 2009 6:32 pm    Post subject: Reply with quote

Unless you/your organization is willing to purchase a product (and someone needs to make sure it works for your most unique cases), you'd be more productive creating a process to follow.

Rather than trying to convert lines of pl/i code to cobol, define the various "business" processes and re-code these processes in cobol. Once underway, you will probably discover that many techniques have been repeated over and over and once you know how to accomplish the same functionality in cobol, re-use the converted process.
_________________
All the best,

di
Back to top
View user's profile Send private message
lenovo
Beginner


Joined: 27 Nov 2008
Posts: 31
Topics: 9
Location: India

PostPosted: Thu Nov 12, 2009 5:54 am    Post subject: Reply with quote

papadi,
Currently, the requirement is limited to converting the PL/I copybook to COBOL copybook and this should be an automate process.
I am willing to write a program(if any) for this but I am not sure from where to start with.
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 699
Topics: 63
Location: USA

PostPosted: Tue Nov 17, 2009 11:54 am    Post subject: Reply with quote

Quote:

I am willing to write a program(if any) for this but I am not sure from where to start with


I am not fluent with Pl/I but apparently you need to do the following to get started -

Code:

Open PL/I copybook for input
Open COBOL copybook for output

while not end of PL/I copybook
  read a line from PL/I copybook
  if comment line then
    write a comment in COBOL copybook
  else
    seperate data definition and comments
    if comments found then write comments to COBOL copybook
    convert data definition to COBOL data definition
    write cobol data definition to COBOL copybook
  end if
end while

Close PL/I and COBOL copybooks


Given a choice I would do it in REXX but it can be done in any language
Back to top
View user's profile Send private message Send e-mail
Crox
Beginner


Joined: 29 May 2004
Posts: 52
Topics: 9

PostPosted: Wed Dec 16, 2009 5:39 am    Post subject: Reply with quote

kolusu wrote:
lenovo,

try these


http://findarticles.com/p/articles/mi_m0EIN/is_1996_March_6/ai_18058112/?tag=content-inner;col1

http://www.cornerstone.nl/ProductsServices/AnytoanyConversionMigration/tabid/568/language/en-US/Default.aspx

Kolusu


Hi, I have seen the conversion results of pl/i to cobol from cornerstone. It changes completely into true cobol. For example depending on where a verify is used for, it is converted into a check for zero, numeric, alfabetic, things like that. Their cobol is very good and easy to understand for cobol programmers. There is not a funny subroutine that simulates a verify in cobol. The most difficult thing is that pl/i has it's own way with allocating slack-bytes, in an other way that cobol works. There is also no good support for bits in cobol on the mainframe. This is also solved in a cobol friendly way.

I have heard about others that makes a kind of assembler from pl/i and change that into cobol. Those results are also working but the source is not easy to maintain anymore.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group