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

What rules are to be followed while using the corresponding options?

1058


How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

1195


What is the difference between next sentence and continue in cobol programing language?

1220


What is the use of intialize verb?

1241


how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)

2381


What is rmode(any) ?

1253


)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?

2005


What are different data types in cobol?

1307


What is the utilization of copybook in cobol?

1181


Whats the difference between search & search ALL?

6513


Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.

5738


What is the compute verb? How is it used?

1134


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

1240


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

2270


What is the difference between binary search and sequential search?

1084