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

can we declare s9(9)v9(9) in cobol ? if yes how many bytes it will occupy ?(urgent plz answer it)

13 Answers   CTS,


I have a occurs for 100 times but it has executed 101 time what could be the reason?

4 Answers  


What is an index for tables?

2 Answers  


What are decleratives in COBOL ?

1 Answers   Xansa,


What is the usage of comp fields in cobol?

0 Answers  






How can we find that module can be called – whether DYNAMICALLY or STATICALLY?

0 Answers  


How to declare if emp-name = AAAAA""BBB in working-storage section. After display emp-name should print like AAAAA""BB

6 Answers   Polaris,


I am getting S00F abend when i try to compare two variable of different pic class,one variable is of 9(09) and another is S9(09) comp-3. First i moved the data from S9(09) comp-3 to 9(09), but no luck. So i tried to move the data from S9(09) comp-3 to X (09) and move to 9(09). I am getting same error message, Please help me to find solution for this ptoblem. ERROR MESSAGE - "The system or user abend S00F R=NULL was issued."

1 Answers  


I have sequential file recl 1000 i want to add another 15 bytes to it. The record length should not change..How?

1 Answers   CTS, HCL,


Explain about different table spaces.

0 Answers  


Can anybody give me example of subscript and index

5 Answers  


wht r the advantages of 77 level number ?

8 Answers   TCS,


Categories