how can we get current dat and time thru cobol pgm
Answers were Sorted based on User's Feedback
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 |
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 |
Answer / aaki
You can fetch current date from SysIBM.Sysdummy1 table in a
working storage variable
| Is This Answer Correct ? | 3 Yes | 1 No |
whn do i get soc7 abend while moving alphanumeric to numeric or while moving numeric to aplhanumeric please reply ASAP?
How do we get current date from system with century in COBOL?
How many divisions we have in Cobol ?
i have mainprogram and subgram...if i compile mainprogram without stop run..what will u get in compilation time?
What is Static,Dynamic linking ?
should I use Go back in the main program ? Yes we can use Go back in main program as well.
What are decleratives in COBOL ?
wht is the diff b/w if and evaluate stmts ?
Should I use STOP RUN in the sub program??why?
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?
What guidelines should be followed to write a structured cobol prgm?
In A cobol program , we can use COPY Statement in FILE- SECTION / WORKING-STORAGE SECTION / ENVIRONMENT DIVIION basically what is the difference