View previous topic :: View next topic
|
Author |
Message |
vodeti Warnings : 1 New User
Joined: 19 Sep 2005 Posts: 13
|
|
|
|
[b]Hi,
Please give solution for this question.
In my COBOL program i have declared the working storage section as follows:
working-storage section.
01 A.
02 B PIC X(10).
02 C PIC 9(4) VALUE 1234.
PROCEDURE DIVISION.
PARA1.
INTIALIZE A.
My question is:
what will be the values of B & C?
Thanks in advance
vodeti |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Vodeti...
Please refer manuals... for a better understanding of the statement...
B & C would be intialized to SPACES and ZEROES respectively.
Regards,
priyesh. |
|
Back to top |
|
|
pa1chandak Currently Banned New User
Joined: 31 Jan 2006 Posts: 55
|
|
|
|
INITIALIZE WILL MOVE ZERO'S TO NUMERIC AND NUMERIC EDITED FIELDS.
AND SPACES TO ALPHABETIC AND ALPHABETIC EDITED FIELDS.
SO B WILL HAVE SPACES AND
C WILL HAVE ZERO'S
INITIALIZE WILL NOT WORK IN THREE CASES
1. FILLERS
2. DEPENDING ON
3. OCCURS
IF I AM WRONG SOMEWHERE PLEASE CORRECT ME
THANK YOU
DO SEND ME THE REPLY
PAWAN
09822546416
// THE ONE I LOVE , I SHALL NEVER BLAME // |
|
Back to top |
|
|
bhoja
New User
Joined: 31 Jan 2006 Posts: 49
|
|
|
|
what is the main use of initialize verb
Thanks
bhoj |
|
Back to top |
|
|
Aji
New User
Joined: 03 Feb 2006 Posts: 53 Location: Mumbai
|
|
|
|
Hi
Initialize will move spaces to b and zeros to c.
Regards
Aji Cherian |
|
Back to top |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
HI,
Quote: |
what is the main use of initialize verb |
INITIALIZE moves spaces to alphabetic fields and zeros to alphanumeric fields
Hope this helps
Regards
Rupesh |
|
Back to top |
|
|
mijanurit Currently Banned New User
Joined: 26 Aug 2005 Posts: 33 Location: bangalore
|
|
|
|
hi!
B's value will be 10 spaces and C's value will be 4 zeros.
regards
mijanurit |
|
Back to top |
|
|
|