Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us