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

Is nested EVALUATE possible


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
padma_prakasam

New User


Joined: 06 Oct 2005
Posts: 31

PostPosted: Wed Nov 14, 2007 9:33 pm
Reply with quote

Is nested EVALUATE possible?? I mean Evaluate inside an Evaluate?

Thanks,
Padma
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Nov 14, 2007 10:04 pm
Reply with quote

Padma,

Would you please tell me why u require evaluate inside evaluate ?
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Wed Nov 14, 2007 10:18 pm
Reply with quote

Yes, it works fine.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


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

PostPosted: Thu Nov 15, 2007 9:41 am
Reply with quote

I can easily think of logic requiring nested conditions of any type, EVALUATE included.

I can also think of how easy it is to test this, rather than just asking.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Fri Nov 16, 2007 3:47 am
Reply with quote

Always remember that 98% of the life of a program is maintenance. My rule of thumb was always never to go beyond 3 levels of "nested". There is no reason to. Over the years, I saw programs that included pages and pages of nested "ifs" - first of all, it is very difficult to debug - we called them "the flying wedge". Second of all, it is not efficient. Do an evaluate (if) and then a perform - go to the exit of a paragraph.
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 Evaluate variable to execute a jcl step JCL & VSAM 3
No new posts Any example of XML GENERATE nested st... COBOL Programming 6
No new posts 3-D Table with nested DEPENDING ON Cl... COBOL Programming 5
No new posts COND referback in nested PROCS? JCL & VSAM 11
No new posts difference between subselect and nest... DB2 1
Search our Forums:

Back to Top