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

some queries regarding value and occurs clause


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mail2romel

New User


Joined: 14 Nov 2005
Posts: 7
Location: pune

PostPosted: Wed Feb 15, 2006 12:32 am
Reply with quote

hi all,
please help me out in some of my queries

1) can we have a value clause with occurs clause.

2) can we have a value clause in a group item 01 A value?

3) what will be the added effect of filler and initialization?


4) please can anyone tell me more about COMP ,
COMP-1,COMP-2,COMP-3,COMP-4 along with internal representation
and some examples cos i'm not clear with this concept .

thanx in advance
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


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

PostPosted: Wed Feb 15, 2006 9:44 am
Reply with quote

Quote:
1) can we have a value clause with occurs clause.

No.
Quote:
2) can we have a value clause in a group item 01 A value?

No, can you have a PIC @ 01. Pls try once & let all of us know.
Quote:
3) what will be the added effect of filler and initialization?

Added effact .....means what ?????
Quote:
4) please can anyone tell me more about COMP ,
COMP-1,COMP-2,COMP-3,COMP-4 along with internal representation

I hope you will find more links, if make a SEARCH.
http://ibmmainframes.com/viewtopic.php?t=110

Regards,

Priyesh.
Back to top
View user's profile Send private message
vikasc4

New User


Joined: 11 Dec 2005
Posts: 32

PostPosted: Wed Feb 15, 2006 12:41 pm
Reply with quote

hi priyesh,

for the question:
Quote:
1) can we have a value clause with occurs clause.


your answer is "NO"

I want to tell you that VALUE clause can appear with OCCURS clause. In that case all elements of the table are set to the same value. For example,

01 MY-TABLE.
02 TABLE-DATA OCCURS 10 TIMES PIC 9(4) VALUE 1.

IS NOW ALLOWED.

All element namely, Table-data(1),........,table-data(10) will be initialized to 1.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


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

PostPosted: Wed Feb 15, 2006 12:54 pm
Reply with quote

Yes, Vikas... I checked that... You are correct....

My apologies for misleading.... Twice in a Day... I need a break.... icon_mad.gif

Regards,

Priyesh.
Back to top
View user's profile Send private message
mail2romel

New User


Joined: 14 Nov 2005
Posts: 7
Location: pune

PostPosted: Wed Feb 15, 2006 9:25 pm
Reply with quote

hi priyesh,
3) what will be the added effect of filler and initialization?

i needed to aske from this question that what is the effect of initialize on filler
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


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

PostPosted: Wed Feb 15, 2006 10:22 pm
Reply with quote

Quote:
i needed to aske from this question that what is the effect of initialize on filler

INITIALIZE doesn't work with FILLER.... you'll have to use VALUE Clause instead...

Regards,

Priyesh.
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts To search DB2 table based on Conditio... DB2 1
No new posts Updating a 1 byte thats in occurs mul... DFSORT/ICETOOL 6
No new posts NOT IN clause in COBOL pgm COBOL Programming 8
No new posts SUSBSCRIPT WITH SIGN IN PIC CLAUSE COBOL Programming 3
No new posts usage of CASE in WHERE clause DB2 10
Search our Forums:

Back to Top