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
 

 

If there is any other logic other than if-else

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

New User


Joined: 22 Jul 2005
Posts: 24
Location: pune

PostPosted: Thu Mar 23, 2006 4:43 pm    Post subject: If there is any other logic other than if-else
Reply with quote

HI All,

I have to insert a value 'D' stored in INSTITUTE in one of the variales: namea,nameb,namec,named,namee,namef. Before that i have to check whether the variables are empy or not.If there is any other logic other than if-else,Please share with me.thank You

if namea = spaces
move INSTITUTE to namea
else if nameb = spaces
move INSTITUTE to nameb
else if namec = spaces
move INSTITUTE to namec
else if named = spaces
move INSTITUTE to named
else if namee = spaces
move INSTITUTE to namee
end if
end if
end if
end if
end if
Back to top
View user's profile Send private message

Jerry

New User


Joined: 16 Sep 2005
Posts: 42

PostPosted: Thu Mar 23, 2006 4:54 pm    Post subject: Re: if else
Reply with quote

I think using evaluate would make it look better, though it is not a different logic.

Correct me if I am wrong.
Back to top
View user's profile Send private message
shivani_tech
Warnings : 2

New User


Joined: 08 Jan 2006
Posts: 22
Location: UNITED KINGDOM

PostPosted: Fri Mar 24, 2006 8:41 pm    Post subject:
Reply with quote

jerry is right it is one of the major aspect of vs-cobolii to use evaluate case statements rather than nested ifs
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
No new posts Need help in building a logic Benchwarmer All Other Mainframe Topics 4 Wed Feb 22, 2017 2:49 am
No new posts Wildcard logic in COBOL dudenithy COBOL Programming 13 Thu Sep 01, 2016 7:36 pm
No new posts Sort Logic to extract data scorp_rahul23 DFSORT/ICETOOL 13 Tue Mar 01, 2016 1: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
No new posts Tricky sort logic required pgopi92 DFSORT/ICETOOL 3 Mon Jan 25, 2016 3:29 pm


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