View previous topic :: View next topic |
Author |
Message |
lenovo Beginner
Joined: 27 Nov 2008 Posts: 31 Topics: 9 Location: India
|
Posted: Tue Nov 10, 2009 8:59 am Post subject: Problem Statament: Convert PL/I to Cobol |
|
|
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 |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
|
Back to top |
|
|
lenovo Beginner
Joined: 27 Nov 2008 Posts: 31 Topics: 9 Location: India
|
Posted: Wed Nov 11, 2009 6:50 am Post subject: |
|
|
dbzTHEdinosauer,
Thanks for the effort.
I have checked google but nothing fruitful.
Can you suggest from where I should start. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12368 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
lenovo Beginner
Joined: 27 Nov 2008 Posts: 31 Topics: 9 Location: India
|
Posted: Wed Nov 11, 2009 11:52 am Post subject: |
|
|
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 |
|
|
prino Banned
Joined: 01 Feb 2007 Posts: 45 Topics: 5 Location: Oostende
|
Posted: Wed Nov 11, 2009 12:20 pm Post subject: |
|
|
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 |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Wed Nov 11, 2009 6:32 pm Post subject: |
|
|
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 |
|
|
lenovo Beginner
Joined: 27 Nov 2008 Posts: 31 Topics: 9 Location: India
|
Posted: Thu Nov 12, 2009 5:54 am Post subject: |
|
|
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 |
|
|
Dibakar Advanced
Joined: 02 Dec 2002 Posts: 699 Topics: 63 Location: USA
|
Posted: Tue Nov 17, 2009 11:54 am Post subject: |
|
|
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 |
|
|
Crox Beginner
Joined: 29 May 2004 Posts: 52 Topics: 9
|
Posted: Wed Dec 16, 2009 5:39 am Post subject: |
|
|
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 |
|
|
|
|