How include time & date in the report generation in cobol
programing?
Answers were Sorted based on User's Feedback
Answer / guest
we have a cobol reserved wordS called CURRENT DATE AND TIME
Syntax: Accept ws-date from CURRENT DATE
| Is This Answer Correct ? | 20 Yes | 3 No |
Answer / varun v
Use the below command
MOVE FUNCTION CURRENT-DATE(1:16)
TO WS-DATE-WORK-AREA
Here WS-DATE-WORK-AREA should have the
format "CCYYMMDDhhmmssms"
CCYY - YEARS
MM - MONTHS
DD - DAYS
hh - HOURS
mm - MINUTES
ss - SECONDS
ms - MILLISECONDS
| Is This Answer Correct ? | 11 Yes | 3 No |
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
what is dynamic array in cobol? what is the difference b/w array and table in cobol?
can we use COPY statement in w-s section? how?
how many divisions are there in cobol
What rules are followed by the search verb.
is it possible to pass an SQL query inside a jcl which is inside a cobol program?
how many bytes do SPPPP999 will store?
What is an index for tables?
what is difference between cobol and cobol/400
ID DIVISION. PROGRAM-ID. PLO. DATA DIVISION. WORKING-STORAGE SECTION. 01 VAR1 PIC 9(2). 01 VAR2 PIC X(2). PROCEDURE DIVISION. ACCEPT VAR2. MOVE VAR2 TO VAR1. STOP RUN. if i give 'PI' in var2 then what will b output of progr. any abend?????
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
consider the following PROCEDURE DIVISION entry OPEN EXTEND IN-FILE identify the correct statement a.organization of IN-FILE is sequential and records can be added in the beginning b.organization of IN-FILE is sequential and records can be added in the end c.organization of IN-FILE is indexed and records can be added in the beginning d.organization of IN-FILE is indexed and records can be added in the end