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 Convert 2010/02/11 to m/dd/yyy.. with string and
without string if any other method... code

Answers were Sorted based on User's Feedback



How to Convert 2010/02/11 to m/dd/yyy.. with string and without string if any other method... code..

Answer / kishore

01 DATE-FIELD
05 DATE-YYYY PIC 9(04).
05 FILLER PIC X(1).
05 DATE-MM PIC 9(02).
05 FILLER PIC X(1).
05 DATE-DD PIC 9(02).
01 DATE-CONT
05 DATE-MM-CONT PIC 9(02).
05 DATE-DD-CONT PIC 9(02).
05 DATE-YYYY-CONT PIC 9(04).

ACCEPT DATE-FIELD

MOVE DATE-DD TO DATE-DD-CONT
MOVE DATE-MM TO DATE-MM-CONT
MOVE DATE-YYYY TO DATE-YYYY-CONT

DISPLAY DATE-CONT

Is This Answer Correct ?    6 Yes 0 No

How to Convert 2010/02/11 to m/dd/yyy.. with string and without string if any other method... code..

Answer / praneetha

by using move reference modification, we can easily convert if

Is This Answer Correct ?    2 Yes 1 No

How to Convert 2010/02/11 to m/dd/yyy.. with string and without string if any other method... code..

Answer / naresh bandaru

01 date-input
05 DATE-YYYY PIC 9(04).
05 FILLER PIC X(1).
DATE-MM PIC 9(02).
FILLER PIC X(1).
DATE-DD PIC 9(02).
01 date-output
05 DATE-YYY PIC 9(03).

05 DATE-M PIC 9(01).
05 DATE-DD1 PIC 9(02).
accept date-input.
move date-yyyy to date-yyy.
move date-mm to date-m.
move date-dd to date-dd1.
display date-output

Is This Answer Correct ?    1 Yes 0 No

How to Convert 2010/02/11 to m/dd/yyy.. with string and without string if any other method... code..

Answer / taufeeq

DATA DIVISION.
WORKING-STORAGE SECTION.
77 DATE1 PIC 9(8).
PROCEDURE DIVISION.
ACCEPT DATE1 FROM DATE MMDDYYYY.
DISPLAY DATE1.

Is This Answer Correct ?    1 Yes 6 No

How to Convert 2010/02/11 to m/dd/yyy.. with string and without string if any other method... code..

Answer / mvrk

The above issue can be resolved by using REDEFINES clause.

01 DATE-FIELD
05 DATE-YYYY PIC 9(04).
05 DATE-MM PIC 9(02).
05 DATE-DD PIC 9(02).
01 DATE-CONT REDEFINES DATE-FIELD
05 DATE-MM-CONT PIC 9(02).
05 DATE-DD-CONT PIC 9(02).
05 DATE-YYYY-CONT PIC 9(04).

I guess the above declaration will resolve it. I have not
tested it.

Friends, please correct me if i am wrong.

Is This Answer Correct ?    1 Yes 13 No

Post New Answer

More COBOL400 Interview Questions

How COBOL helps Mainframe to maintain large records ???

1 Answers   Satyam,


What is input procedure?

0 Answers  


Explain the input procedure?

0 Answers  


Explain the types of perform?

0 Answers  


What is the actual use of fillers?

0 Answers  


what is the difference between comp & comp-3?

4 Answers  


How can i change the below code in SQL to cobol/400? EXEC SQL SELECT COUNT(*) INTO : WS-COUNT FROM Db file WHERE Field 1 = : WS-VAR AND Field 2 = : WS-USERID END-EXEC * EVALUATE TRUE WHEN SQLCODE = +000 MOVE WS-COUNT TO Copybook field WHEN SQLCODE = +100 MOVE ZEROES TO Copybook field

2 Answers  


write a cobol program to display prime numbers between 1 to 100?

5 Answers   Cap Gemini, NISA,


01 A PIC 9. 01 B PIC 99V1. 01 C PIC 99. MOVE 1 TO A. MOVE 0.2 TO B. COMPUTE C ROUNDED TO 3/3 + A.

2 Answers  


what is INPUT PROCEDURE and OUTPUT PROCEDURE?

2 Answers  


What is comp?

0 Answers  


How to Convert 2010/02/11 to m/dd/yyy.. with string and without string if any other method... code

5 Answers   CGI,


Categories