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 |
Determine the total no of bytes in the following. 01 rec1. 02 a pic x(6) 02 b redefines a. 03 c occus 6 times pic 9. 02 d occurs 6 times pic 9. 03 e pic x(5) 03 f pic 999.
what is SYNCHRONIZATION?
given the following: 77 A PIC 9V9 VALUE 9.5 77 B PIC 9 VALUE 9. 77 C PIC V9 VALUE 0.8 77 D PIC 9 77 E PIC 9 77 F PIC 9V999 what are the contenta of D E nad F after the following statements are executed: COMPUTE F ROUNDED=A+C/B MULTIPLY A BY C GIVING E ADD B C A GIVING D ROUNDED a.F=9.589 E=8 D=1 b.F=9.589 E=8 D=9 c.F=9.589 E=7 D=9 d.F=9.589 E=7 D=1
created cluster using IDCAMS ..that is empty ..when i write a program for read using Input ..wil it open the cluster or gives any error?
How is sign stored in a COMP field ?
What are the different rules of SORT operation?
01 a pic x(6) value is abcdef 01 b pic x(3) move a to b wht will be the value in b ?
How do u know what version of cobol u are using?
What is the maximum size of a 01 level item in COBOL I? in COBOL II?
is it possible to pass an SQL query inside a jcl which is inside a cobol program?
What is the use of intialize verb?
What is an in line PERFORM? When would you use it? Anything else to say about it?