IBM MAINFRAMES LIVE: How to use ACCEPT in cobol
Beta

How to use ACCEPT in cobol

|


ACCEPT can transfer data from input device or system information contain in the reserved data items like DATE, TIME, DAY.
ACCEPT WS-VAR1 (FROM DATE/TIME/DAY/OTHER SYSTEM VARS).
If FROM Clause is not coded, then the data is read from terminal. At the time of execution, batch program will ABEND if there is no in-stream data from JCL and there is no FROM clause in the ACCEPT clause.

DATE option returns six digit current date in YYMMDD
DAY returns 5 digit current date in YYDDD
TIME returns 8 digit RUN TIME in HHMMSSTT
DAY-OF-WEEK returns single digit whose value can be 1-7 (Monday-Sunday respectively)

Related Posts :



0 comments: