ENTRY Entry-Name [ USING [ BY { VALUE } ]{ Identifier } ... ] { REFERENCE } |
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. main. 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. finish. goback. p-entry1. display message "Entry 1 : " par-1 perform finish. p-entry2. display message "Entry 2 : " par-2 perform finish. p-entry3. display message "Entry 3 : " par-1 ", " par-3 perform finish. |
program-id. callentry. working-storage section. 01 ws-par-1 pic x(5) value "hello". 01 ws-par-2 pic x(5) value "bye". 01 ws-par-3 pic 9(5) value 12345. procedure division. main. call "testentry" call "tentry3" using ws-par-1 ws-par-3 call "tentry2" using ws-par-2 call "tentry1" using ws-par-1 goback. |