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 |
What are the steps you go through while creating a COBOL program executable?
here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?
plz any one tell clearly the justify right clause?
Consider the following COBOL entries 05 X PIC 99 VALUE 10. ADD 40 X TO X. COMPUTE X = 3 * X - 40. The result in X is
how to transfer the file from pc to mainframe??
How do you sort in a COBOL program? Give sort file definition, sort statement syntax and meaning.
When is a scope terminator mandatory?
what happens when a copybook variables are declared using include statement ?
where did you see the information regarding abend codes in jcl?
How do you define a table/array in COBOL?
SIGN TRAILING SEPARATE field occupy ?
what is the default print format? in cobol