skip to main content

Procedure Division Statements : ENTRY

ENTRY
General Format
ENTRY Entry-Name [ USING [ BY { VALUE     } ]{ Identifier } ... ]
Syntax rules
1.
Entry-Name is a non-numeric literal.
2.
Identifier is a data item defined with a level-number of 01 or 77 and it must appear in the Linkage Section.
3.
Each Identifier cannot appear more than once in the USING phrase.
General rules
1.
2.
3.
Examples
Program with several entry points and program to call the different entry-points
program-id. testentry.
linkage section.
01 par-1  pic x(5).
01 par-2  pic x(5).
01 par-3  pic 9(5).
procedure division.
 perform finish.
 entry "tentry1" using par-1
    perform p-entry1.
 entry "tentry2" using par-2
    perform p-entry2. 
 entry "tentry3" using par-1 par-3
    perform p-entry3.
  goback.
  display message "Entry 1 : " par-1
  perform finish.
  display message "Entry 2 : " par-2
  perform finish.
  display message "Entry 3 : " par-1 ", " par-3
  perform finish.
 
program-id. callentry.
working-storage section.
01 ws-par-1  pic x(5value "hello".
01 ws-par-2  pic x(5value "bye".
01 ws-par-3  pic 9(5value 12345.
procedure division.
  call "testentry"
  call "tentry3" using ws-par-1 ws-par-3
  call "tentry2" using ws-par-2
  call "tentry1" using ws-par-1
  goback.

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left