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
 

 

Initialize 88 level condition name

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
shekhar1s

New User


Joined: 13 Apr 2006
Posts: 14
Location: USA

PostPosted: Thu Jun 07, 2012 9:04 am    Post subject: Initialize 88 level condition name
Reply with quote

Can we initialize 88 level condition name variable?
88 ABC-Y VALUE 'Y'
INITIALIZE ABC-Y
Back to top
View user's profile Send private message

chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 269
Location: Mumbai

PostPosted: Thu Jun 07, 2012 9:09 am    Post subject:
Reply with quote

Hi Shekhar,

yes you can initilaize your variable with 88 level value but not in the way you did

For example

Code:
05 WS-A                   PIC X(1)      VALUE 'N'.
     88 ABC-Y                                VALUE 'Y' .


to set WS-A to 'Y' you need to mention like below

Code:
SET ABC-Y   TO TRUE


Addition to this I would suggest go through the CObol manulas to understand the basic concepts.

Regards,
Chandan
Back to top
View user's profile Send private message
shekhar1s

New User


Joined: 13 Apr 2006
Posts: 14
Location: USA

PostPosted: Thu Jun 07, 2012 9:15 am    Post subject:
Reply with quote

Ohh Sorry, I mean to say that what happens if we initialize it like below:
INITIALIZE ABC-Y

Will it reset to spaces? or will it retain the value 'Y' or some error?
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Thu Jun 07, 2012 9:56 am    Post subject:
Reply with quote

Looks like an interview question

why didnt you try writing a small program
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Jun 07, 2012 10:50 am    Post subject:
Reply with quote

A field declared with a level number of 88 is commonly known as a 'condition name'. They use no storage, for proof, check the excellent post from Robert (Sample) in this thread.

The INITIALIZE statement sets selected categories of data fields to predetermined values. It is functionally equivalent to one or more MOVE statements. And the MOVE statement transfers data from one area of storage to one or more other areas.

If you add these tidbits, you'll understand the question does not stand on practical grounds. INITIALIZE work on storage and 88-levels take no storage.

You can also treat 88-levels as toggle-switch -- which is by its very nature, is either ON or OFF. If you've multiple conditions to check from, then too, only one switch is ON. If by INITIALIZE you mean to put all the conditions either ON or OFF - that is not what this level is designed for.
Back to top
View user's profile Send private message
shekhar1s

New User


Joined: 13 Apr 2006
Posts: 14
Location: USA

PostPosted: Sat Jun 09, 2012 9:21 pm    Post subject:
Reply with quote

Thanks Anuj, for so good explanation... i would assume that this would be the compiler error.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Sat Jun 09, 2012 9:43 pm    Post subject:
Reply with quote

Phew

Assume yet this shows you have not written a 10 line code
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Jun 09, 2012 10:01 pm    Post subject:
Reply with quote

Hello,

Quote:
i would assume that this would be the compiler error.
If there was a compiler error that you did not understand, you should have posted the relevant code and the compiler error(s).

By not postng the "real" issue initially, this just wasted several iterations and people's time.
Back to top
View user's profile Send private message
shekhar1s

New User


Joined: 13 Apr 2006
Posts: 14
Location: USA

PostPosted: Sat Jun 09, 2012 11:20 pm    Post subject: Reply to: 88 Level Initialization???
Reply with quote

I am sorry but i did not write any program for this, the question just got into my mind so thought of asking here as it got so many good brains...
And if you feel that this is just wastage of time... i don't feel so... it opens mind of people those reading this post and thinking for the solution and explanation... Also as some people said this could be the good question for interview... if you really want to test the people thoughts... How good would be the technical skills when the person answers something like Anuj...
Time never ever wasted my friend... everyday we learn something from
stupid/intelligent questions or discussion... we are still learners... so be cool and have patience...
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Sat Jun 09, 2012 11:49 pm    Post subject:
Reply with quote

1.You never searched
2.I believe there was just the same question a few days back in the very same forum
3.Again ( I am trying to sound like a friend) coming to my point if you had just read the manual and provided you are able to articulate the examples and concept of 88 level variables and searching forum I bet you could have developed all permutation and combinations of code and you would have mastered it yourself
4.There wouldnt have been the need to prolong the thread for 2 days
5.It might be painful even after explanation you dont give attempt to try and blindly say you 'Assume'
6.Its like teaching people for free who shows no interest
7.Last but not the All experts would be happy to see programmers who show intrest in resolving their own techincal problems
8.(I am no expert yet icon_smile.gif)
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Sun Jun 10, 2012 2:40 am    Post subject:
Reply with quote

We just had this thread starting May 31st. shekhar1s, did you even TRY to search the forum before posting your question? Because you basically asked EXACTLY the same thing.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Jun 10, 2012 7:32 am    Post subject:
Reply with quote

Hello,

Quote:
And if you feel that this is just wastage of time... i don't feel so... it opens mind of people those reading this post and thinking for the solution and explanation...
Hopefully, you will change your "feeling". It is very much off the mark . . .

As was mentioned, this was asked only a week or so ago. As you have been here for more than 6 we can only hope that you would know how to use the forum Search.

This forum expects to have members with some level of experience and this topic is covered in the first year of COBOL training. People are also expected to try things on their system and if strange things occur, post what they tried and what happened - posting relevant info so we can help.

As far as "cool and patience" do you not understnd that if we were not these, your topic would have been locked and you probably would have been Warned of worse.
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
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts INCLUDE condition questions van bui DFSORT/ICETOOL 1 Thu Jun 30, 2016 9:52 am
No new posts 2 vsam file compare and update a fiel... ABINAYATHULASI DFSORT/ICETOOL 6 Sun May 29, 2016 11:15 am
No new posts Syncsort TPF Level Majid Hussain SYNCSORT 2 Wed Apr 13, 2016 2:22 am
No new posts Need a logic to validate the data in ... sandeep kumar302 COBOL Programming 17 Mon Feb 01, 2016 3:30 pm


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