Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Define cobol?

1480


Write the code implementing the perform … varying.

1121


i want a program using by if, evaluate , string, unstring, perform, occurs?

4799


How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

3317


What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?

1270


What is the Purpose of POINTER Phrase in STRING command in COBOL?

1298


how do you reference the variable unblock file formats from cobol programs

1380


Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.

2474


How many bytes S(8) comp field occupy and its maximum value?

2190


Name some of the examples of COBOl 11?

3196


how do you reference the variable block file formats from cobol programs

1308


What is difference between static and dynamic call in cobol?

1463


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

1293


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

2605


When is inspect verb is used in cobol?

1309