Download presentation
Presentation is loading. Please wait.
1
SCOPE TERMINATORS Definition:
For Your Information FOR THE PROCEDURE DIVISION: A period will end every “open” logical control structure currently begun. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ READ INPUT-FD AT END MOVE “yes” TO EOF PERFORM 200-CALC UNTIL EOF = “yes” MOVE INPUT-REC TO OUTPUT-REC WRITE OUTPUT-REC RULE OF THUMB: Always use END-STRUCTURE delimiters and you will only need a period at the end of every paragraph. Indentation has NOTHING to do with the logic of the program!!! Definition: Delimits the end of a logical control construct or the end of a statement with clauses. DELIMITER = a character that begins or ends a unit of data DELIMIT = to fix or define the limits of Examples: END-READ END-PERFORM END-COMPUTE (etc…) period Statement Syntax
2
ACCEPT DATE Purpose: accepts current date from the computer system
Syntax Definition: ACCEPT identifier FROM DATE [YYYYMMDD]. Examples: 01 TODAYS-DATE PIC 9(6). 01 TODAYS-DATE. 05 TODAYS-YR PIC 99. 05 TODAYS-MM PIC 99. 05 TODAYS-DD PIC 99. For Your Information The default format for the date is YYMMDD. If using the YYYYMMDD format option, the pic clause for todays-date is 9(8) and todays-yr is 9(4). Statement Syntax
3
ACCEPT TIME Purpose: accepts current time from the computer system
Syntax Definition: ACCEPT identifier FROM TIME [YYYYMMDD]. Examples: 01 TODAYS-TIME PIC 9(6). 01 TODAYS-TIME. 05 TODAYS-YR PIC 99. 05 TODAYS-MM PIC 99. 05 TODAYS-DD PIC 99. For Your Information The default format for the date is HHMMSSss. Statement Syntax
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.