Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Cobol Intialize verb

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
vodeti
Warnings : 1

New User


Joined: 19 Sep 2005
Posts: 13

PostPosted: Fri Jan 20, 2006 3:49 pm    Post subject: Cobol Intialize verb
Reply with quote

[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
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Fri Jan 20, 2006 4:04 pm    Post subject: Re: cobol-intialize verb
Reply with quote

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
View user's profile Send private message
pa1chandak
Currently Banned

New User


Joined: 31 Jan 2006
Posts: 55

PostPosted: Thu Feb 02, 2006 1:22 pm    Post subject:
Reply with quote

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
View user's profile Send private message
bhoja

New User


Joined: 31 Jan 2006
Posts: 49

PostPosted: Fri Feb 03, 2006 3:24 pm    Post subject:
Reply with quote

what is the main use of initialize verb

Thanks
bhoj
Back to top
View user's profile Send private message
Aji

New User


Joined: 03 Feb 2006
Posts: 53
Location: Mumbai

PostPosted: Fri Feb 03, 2006 3:34 pm    Post subject: Re: cobol-intialize verb
Reply with quote

Hi

Initialize will move spaces to b and zeros to c.

Regards

Aji Cherian
Back to top
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 464

PostPosted: Fri Feb 03, 2006 4:08 pm    Post subject: Re: cobol-intialize verb
Reply with quote

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
View user's profile Send private message
mijanurit
Currently Banned

New User


Joined: 26 Aug 2005
Posts: 33
Location: bangalore

PostPosted: Mon Feb 06, 2006 4:30 pm    Post subject: Re: cobol-intialize verb
Reply with quote

hi!

B's value will be 10 spaces and C's value will be 4 zeros.

regards
mijanurit
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts COBOL Programming Sandpit? jodrisco COBOL Programming 6 Wed Apr 12, 2017 3:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us