View previous topic :: View next topic
|
Author |
Message |
rajasekhar reddy
New User
Joined: 17 Jan 2006 Posts: 10
|
|
|
|
hi all,
can i know in detail what is an entry point in a cobol program?
i have gone thru many articles but i cant get a clear view of it.
Thanks in advance
Rajasekhar Reddy.K |
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
It's the line of code that starts execution of the program when given control after loading by the operating system or when control is passed from module to module in a statically linked program |
|
Back to top |
|
|
rajasekhar reddy
New User
Joined: 17 Jan 2006 Posts: 10
|
|
|
|
hi ,
Thanks for the response.
can you make it a bit clear.
Thanks in advance |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Entry points are used by subprograms to specify different subfunctions.
Here is a sample, with 3 entry points:
Code: |
ID DIVISION.
PROGRAM-ID. PROGNM1.
LINKAGE SECTION.
01 LK-PARM1 PIC X(8).
01 LK-PARM2 PIC X(130).
PROCEDURE DIVISION USING LK-PARM1.
PERFORM 1A-PROCESS-OPTION1.
ENTRY PROGNM2 USING LK-PARM1 LK-PARM2.
PERFORM 2A-PROCESS-OPTION2.
ENTRY PROGNM3 USING LK-PARM1.
PERFORM 3A-PROCESS-OPTION3. |
The main program will be able to do:
Code: |
CALL 'PROGNM1' USING WS-PARM1
CALL 'PROGNM2' USING WS-PARM1 WS-PARM2
CALL 'PROGNM3' USING WS-PARM1 |
The DATA DIVISION is shared by all the entry points, which means, for example, that the file opened by OPENA can be closed by CLOSEA. |
|
Back to top |
|
|
vijayamadhuri
Active User
Joined: 06 Apr 2005 Posts: 180
|
|
Back to top |
|
|
|