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
 
Difference between VALUE and INIT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
MSMITHUK

New User


Joined: 31 Mar 2005
Posts: 5
Location: London

PostPosted: Mon Apr 24, 2006 8:41 pm    Post subject: Difference between VALUE and INIT
Reply with quote

I have read the Language Reference manual but am still not clear.
Can anyone help with an explanation of the difference between using INIT to set the value of a variable and using VALUE.
Thanks in advance,

M
Back to top
View user's profile Send private message

sri.mainframes

New User


Joined: 16 Feb 2006
Posts: 29
Location: MUMBAI

PostPosted: Thu Jun 22, 2006 3:57 pm    Post subject: Re: Difference between VALUE and INIT
Reply with quote

hi ,


init is used in pl/1 to assign the value to the variables
value is used in cobol to assign value to the variavles
in cobol initilize means numeric variables set to zeros
and character variables set to spaces

Regards
Prince
Back to top
View user's profile Send private message
karnatikalyan

New User


Joined: 08 Feb 2006
Posts: 5

PostPosted: Thu Jun 29, 2006 1:42 pm    Post subject: Re: Difference between VALUE and INIT
Reply with quote

Hi,

I can tell you with an example of char data type.

for char data type the default length is 1. But if you use VALUE, you can assign a string of length morethan 1

For example:-

DCL NAME CHAR INIT('N'); Here the defualt lengh of name is 1 so you can not assign any string that has a lengh morethan 1

But

DC NAME CHAR VALUE('ASDASDSDDASDASDAS'); Though the default lengh is 1, still NAME can be assigned with a string that has length morethan one. NAME can be assigned with any length of chars.

If you have better idea about this please let me know.

Regards,
Karnati kalyan.
Back to top
View user's profile Send private message
MSMITHUK

New User


Joined: 31 Mar 2005
Posts: 5
Location: London

PostPosted: Thu Jun 29, 2006 3:09 pm    Post subject:
Reply with quote

I have also found that when using the keyword VALUE to initialise a variable then the contents of that variable can NOT be changed within the program.

Cheers,
Moira
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 -> PL/I & Assembler 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. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
No new posts ISMF Difference between volume count ... upendrasri IBM Tools 2 Tue Dec 05, 2017 12:40 pm
No new posts Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts Difference between TWALENG and TWASIZE Arunkumar Chandrasekaran CICS 3 Tue Jan 03, 2017 12:57 pm

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