IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
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
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

Senior Member


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

PostPosted: Wed May 16, 2007 9:13 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Released Init 0 All Other Mainframe Topics 13
No new posts Initializing filler default value whe... COBOL Programming 6
No new posts VSAM Initializing causing Repro to ru... JCL & VSAM 4
No new posts Content of variable before moving or ... COBOL Programming 10
No new posts Init macro or not ? TSO/ISPF 4
Search our Forums:

Back to Top