View previous topic :: View next topic |
Author |
Message |
yadav2005 Intermediate

Joined: 10 Jan 2005 Posts: 348 Topics: 144
|
Posted: Mon Jan 28, 2008 11:21 am Post subject: PLI Subroutine |
|
|
Hai,
[code:1:b5ee1d0b5f]
MAINPROC:PROCEDURE OPTIONS(MAIN);
DCL X FIXED DEC(7,2);
DCL Y FIXED DEC(7,2);
DCL Z FIXED DEC(8,2);
DCL SUBRT ENTRY;
/*declares SUBRT as procedure */
GET LIST(X,Y);
CALL SUBRT(X,Y,Z);
PUT LIST( |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12383 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
yadav2005 Intermediate

Joined: 10 Jan 2005 Posts: 348 Topics: 144
|
Posted: Mon Jan 28, 2008 12:20 pm Post subject: |
|
|
Kolusu,
Thank You for your reply.Can you please tell me the equivalent of COBOL in PLI as below and how we can execute this:
Code: |
MAIN PROGRAM
CALL 'ABC' USING X,Y.
STOP RUN.
|
Code: |
SUB PROGRAM
PROCEDURE DIVISION USING X,Y.
|
In cobol we compile Sub Program seperately and then comPile main program and run the main program.If a similar kind is needed to be achived ,can it be achieved in PL1 and how. Please let me know from you. |
|
Back to top |
|
 |
vkphani Intermediate

Joined: 05 Sep 2003 Posts: 483 Topics: 48
|
|
Back to top |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Tue Jan 29, 2008 5:08 am Post subject: |
|
|
Quote: |
what is the difference in External Procedure and Internal Procedure on PLI ?
|
An external routine is one that is written and compiled separate to the routine calling it. An internal routine is one that is coded within the same program.
You could consider a PERFORMed Cobol paragraph the same as a PL/1 sub-routine except PL/1 sub-routines cannot be fallen through to except by bad coding which the compiler should pick up. They are NOT the same but it might help your understanding. _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
 |
|
|