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 to display date in reverse order if the pic clause of
the is numeric
suppose date is 09032010 ==> need to print in 20100309
(pic clause is numeric)

Answer Posted / reshma j.

INPUT-DATE has value of 09032010.

In working storage:
01 INPUT-DATE.
03 MM1 PIC 9(2).
03 DD1 PIC 9(2).
03 CCYY1 PIC 9(4).

01 PRINT-DATE.
03 CCYY2 PIC 9(4).
03 DD2 PIC 9(2).
03 MM2 PIC 9(2).

In Procedure Division:

MOVE MM1 TO MM2.
MOVE DD1 TO DD2.
MOVE CCYY1 TO CCYY2.

After Moving values,PRINT-DATE value will be 20100309.
In this cond,Its totally depend on how we declare format in
working storage section.

plz let me know,if i m wrong.

Is This Answer Correct ?    14 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When is inspect verb is used in cobol?

1234


What is amode(24)?

1219


How do u write test cases?

2055


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

1172


What are declaratives and what are their uses in cobol?

1185


What are the various section in data division and briefly explain them.

1156


How many sections are there in data division in COBOL?

1115


Write a program to explain size error.

1180


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

1213


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

1141


Why did you choose to work with ibm mainframe cobol programming?

1086


State the various causes of s0c1, s0c5 and s0c7.

1063


What kind of error is trapped by on size error option?

1219


For rewrite, why is it mandatory that file needs to be opened?

1088


explain sorting techniques in cobol program?

1181