How do you fetch current date in normal cobol pgm and in
cobol-db2 pgm?
Answer Posted / sharath
Normal program
--------------
WORKING-STORAGE SECTION..
01 WS-DATE PIC X(6).
01 CURDATE.
05 WS-DATE-20 PIC X(2) VALUE '20'.
05 WS-DATE-YR PIC X(2).
05 FILLER PIC X(1) VALUE '/'.
05 WS-DATE-MT PIC X(2).
05 FILLER PIC X(1) VALUE '/'.
05 WS-DATE-DT PIC X(2).
PROCEDURE DIVISON..
ACCEPT WS-DATE FROM DATE
MOVE WS-DATE(1:2) TO WS-DATE-YR
MOVE WS-DATE(3:2) TO WS-DATE-MT
MOVE WS-DATE(5:2) TO WS-DATE-DT
DISPLAY CURDATE
Cobol-DB2
--------
Just writing the query..
Select CURRENT DATE into
:ws-date
from SYSIBM.SYSDUMMY
| Is This Answer Correct ? | 14 Yes | 0 No |
Post New Answer View All Answers
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
how do you reference the fixed unblock file formats from cobol programs
What rules are to be followed while using the corresponding options?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
How you can read the file from bottom?
How many bytes S(8) comp field occupy and its maximum value?
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
What are INPUT PROCEDURE and OUTPUT PROCEDURE?
input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?
what is the use of outrecord?
What are the rules of the move verb?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?