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

If there is any other logic other than if-else


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Finding faulty logic Subscript out of... COBOL Programming 5
This topic is locked: you cannot edit posts or make replies. Need assistance in job scheduling logic. Mainframe Interview Questions 2
No new posts Rexx Logic error while adding seperat... CLIST & REXX 3
No new posts PL/1 Callback address logic in z/OS C... PL/I & Assembler 1
No new posts Sync logic between VSAM files and DB2... COBOL Programming 9
Search our Forums:

Back to Top