How include time & date in the report generation in cobol
programing?

Answers were Sorted based on User's Feedback



How include time & date in the report generation in cobol programing?..

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

How include time & date in the report generation in cobol programing?..

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

Post New Answer

More COBOL Interview Questions

How do u know what version of cobol u are using?

3 Answers  


How do get the result of your program directly on your pc?

0 Answers   UST,


how to pass 100 to s9(4) how r they inserted ?

3 Answers   TCS,


Hi, My interviewer ask A calls B and C calls B, a and b are static c and b are dynamic.what happens if they compile and execute at same time.

3 Answers   iGate,


WT R TECHNICAL MAINFRAME QUESTION ASKED IIN ANJANASOFTEARE??

1 Answers  


What are some examples of command terminators?

1 Answers  


What is the difference between comp and comp-3 usage?

0 Answers  


01 var1 pic x(10) 01 var2 redefines var1 pic 9(10). then in procedure division move 'abcde' to var1 then waht is the value of var1 and var2

9 Answers   HSBC,


Which of the following paragraphs is compulsory in every COBOL program? (a) SPECIAL-NAMES (b) PROGRAM-ID (c) FILE-CONTROL (d) OBJECT-COMPUTER

4 Answers  


What are the two search techniques ?

2 Answers   iGate,


In a COBOL program, 2 tables TABLE1 and TABLE2 are defined that are indexed by INDEX1 and INDEX2 respectively. Can we use INDEX1 with TABLE2 and INDEX2 with TABLE1?

1 Answers  


How do you differentiate between cobol and cobol-ii?

0 Answers  


Categories