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 |
2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic
which one is better among static call and dynamic call?
What do you understand by passing by reference and passing by content?
how do you reference the variable unblock file formats from cobol programs
What are different file OPEN modes available in COBOL?
Scenario: I have 3 Input Files.Read the first i/p file and depending on certain business logic, I want to read wither i/p file-2 or i/p file-3.Now, depending on certain business logic applied to the record read from either file-2 or file-3, I decide to write them to either output file-2 or output file-2. Question: How many job steps are necessary to implement a solution for the above.
What is the difference between CONTINUE & NEXT SENTENCE ?
What are the divisions in a cobol program? Which one is the mandatory division among them?
Syntax for JCLLIB & JOBLIB???
What is the different between index and subscript?
I have a file it contain 10 records.i got abend at 8th record because of soc7.how do you know that perticular record got abend?
can u give result for the fallowing example... 05 a pic 9(2) 05 b redifines a pic x(2). move 'xy' to b. display a,b.