SCOPE TERMINATORS - PowerPoint PPT Presentation

1 / 3
About This Presentation
Title:

SCOPE TERMINATORS

Description:

If using the YYYYMMDD format option, the pic clause for todays-date is 9(8) and ... 01 TODAYS-DATE PIC 9(6). 01 TODAYS-DATE. 05 TODAYS-YR PIC 99. 05 TODAYS-MM PIC 99. ... – PowerPoint PPT presentation

Number of Views:89
Avg rating:3.0/5.0
Slides: 4
Provided by: computi199
Category:
Tags: scope | terminators | pic

less

Transcript and Presenter's Notes

Title: SCOPE TERMINATORS


1
SCOPE TERMINATORS
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 READ INPUT-FD AT END MOVE
yes TO EOF
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
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).
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.
Write a Comment
User Comments (0)
About PowerShow.com