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
 

 

Use of initializing INIT((1)' 'instead of INIT(2)

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

New User


Joined: 20 Feb 2005
Posts: 65
Location: chennai

PostPosted: Wed May 16, 2007 6:14 pm    Post subject: Use of initializing INIT((1)' 'instead of INIT(2)
Reply with quote

. What is the use of initializing INIT((1)' ') instead of INIT((2)' '); because in my programs many variables are initialized in this manner.

Does it have any significance?



3 RATE_BAND CHAR (2) INIT((1) ' ' );

3 RATE_BAND CHAR (2) INIT((2) ' ' );



2. How do we display group item.

3. How to display the following variable

5 SO_SNA BIT(1) INIT((1)'0'B)
Back to top
View user's profile Send private message

Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 964
Location: Richmond, Virginia

PostPosted: Wed May 16, 2007 9:13 pm    Post subject:
Reply with quote

The (1) and (2) are repeat counters, but since in this case you have but one field, any repeat count is redundant (and clutter in my opinion). The fact that the field has 2 bytes is irrelevant - setting a field of any length to null string or blank will blank the entire field.

A great feature of PL/I is the GET DATA and PUT DATA statements.

So the statement PUT DATA SO_SNA;
will output SO_SNA=<value>. This works for any fields.
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
No new posts Released Init 0 Yolanda Harvey All Other Mainframe Topics 13 Thu Aug 11, 2016 8:51 pm
No new posts Initializing filler default value whe... dsivapradeep COBOL Programming 6 Thu Feb 13, 2014 11:17 am
No new posts VSAM Initializing causing Repro to ru... bpavan2k4 JCL & VSAM 4 Fri Nov 29, 2013 6:27 pm
No new posts Content of variable before moving or ... hemu88 COBOL Programming 10 Fri Feb 10, 2012 9:52 am
No new posts Init macro or not ? Marso TSO/ISPF 4 Wed Jan 11, 2012 4:28 pm


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