how can we get current dat and time thru cobol pgm

Answers were Sorted based on User's Feedback



how can we get current dat and time thru cobol pgm..

Answer / vinodquestion

HI friend,

Move function CURRENT-DATE to dt.

Here dt is a working storage variable.

If you want exactly date and time do this

Instead of CURRENT-DATE in above statement write this.

CURRENT-DATE(1:16)

That is using referential modification.

Is This Answer Correct ?    10 Yes 0 No

how can we get current dat and time thru cobol pgm..

Answer / gummadi srinivas

USING REFERENCE MODIFICATION WE GET DATE

1) current date
move function current-date (1:8) to ws-today
here ws-today is w.s.s variable


2) current time
move function current-date (9:6) to ws-time
here ws-time is the w.s.s variable

Is This Answer Correct ?    4 Yes 0 No

how can we get current dat and time thru cobol pgm..

Answer / aaki

You can fetch current date from SysIBM.Sysdummy1 table in a
working storage variable

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More COBOL Interview Questions

What is the difference between a binary search and a sequential search?

3 Answers  


If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly

0 Answers  


How can i write a comp-3 variable into a sequential file should i declara the field in the file description as comp- 3?

1 Answers  


how many bytes do SPPPP999 will store?

18 Answers  


What are options have been removed in COBOL 11?

1 Answers  






What is SDSF?

3 Answers  


How many divisions we have in Cobol ?

4 Answers   Wipro,


Size of a column has been changed in DB2 table (Suppose it was of 5 characters and later changed to 4 characters) and forgot to change the DCLGEN in COBOL program, what will happen during the execution of code? If the program Abends then what will be the error? If it doesn't abend then hpw the error can be catched?

5 Answers   IBM,


what will be the output when a)pic 9(6)value 000178 is moved to pic ***,***. b)pic 9(5) value 57397 is moved to pic $$,$$9.

5 Answers  


after udatingg first 110 rows, my job abends. now how do i change my cobol program so that when i restart the Job it will start updating from 111th row ( i.e in next run I di=ont want to update those 110 rows which are already been updated in the first run before job abend)

7 Answers   Allianz, Wipro,


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  


How do you reference the following file formats from cobol programs?

0 Answers  


Categories