ENTRY Statement



The optional ENTRY statement specifies the symbolic name of the first instruction to be executed when the program is called by its module (member) name for execution or by an alias that does not match an executable external symbol. An ENTRY statement should be used whenever a module is reprocessed by the binder, as the first physical instruction may no longer be the first logical instruction.

By default the entry point is either CEESTART if DYNAM=DLL and CEESTART exists, or the first byte of the first control section in the program. If the module contains multiple text classes and an entry point is not specified, the results are not predictable. CEESTART implies Language Environment (LE) compliance which may not be true for Assembler programs.




//L        EXEC PGM=HEWL,
//             PARM='MAP,LET,LIST,NCAL',
//             COND=(8,LT,C)
//SYSLIN   DD  DSN=&&OBJ,DISP=(OLD,DELETE)
//         DD  DDNAME=SYSIN
//SYSLMOD  DD  DISP=SHR,DSN=real.livbrary
//*SYSLMOD  DD  DISP=SHR,DSN=real.library(progname)
//SYSUT1   DD  DSN=&&SYSUT1,
//            SPACE-(1024,(120,120),,,ROUND),
//            UNIT=VIO,DCB=BUFNO=1
//SYSPRINT DD  SYSOUT=*
//MYLIB    DD  DISP=SHR,DSN=program.libarary
//SYSIN    DD  *
  ENTRY   start_point
  INCLUDE MYLIB(mainprog)
  NAME    progname


A valid ENTRY point, limited to 8 characters, is defined as either a control section name or an entry name in an input module. A possible alternative to the ENTRY statement might be multiple ORDER statements.

Copyright © Legac-e Education 2015-