Go to:  Davar site entry | Site contents | Site index | Mainframe | PLI | Text bottom



 About  the  Davar  Web  Site

The All PL/I programs are divided into 3 distinct categories: 1.  Functions - subprograms which return value in place of their reference in the calling program Fuctions don't perform any action for the calling program, they just return value in place of their reference. REPLACE('ABCDEF','CD','--') will return the value of 'AB--EF' A special type of function is a "Predicate".  Predicate is a function with a True/False value ('1'B/'0'B for PL/I) LEAP('1900') will return the value of '0'B LEAP('2000') will return the value of '1'B Predicates can be conviniently used in conditions IF (LEAP(SUBSTR(CURDATE(),7))) THEN .  .  . or in expressions Days(02)=28+LEAP(Year); 2.  Routines - subprograms which are called from other programs to perform certain action (E.g.:  Print title line to the specified file).  Normally routines don't return any value to the calling program. CALL PRNTTTL( Normally the don't return any value to the calling program. Any blank line can be deleted when you put '0' ASA control code to the first position of next line. Note: Some programs have a significant creation/modification date span incompartible with their complexity. This is normally due to style modifications not logic. Though this is not required by PL/I for readability purposes the following consistent style is observed: PL/I words and external idenfifiers are upper case Internal idenfifiers are mixed case Entire debugging code is lower case Policy with comment brackets Debugging comments .  .  .



Go to:  Davar site entry | Site contents | Site index | Mainframe | PLI | Text top