EVALUATE ALSO

This is a Mainframe COBOL forum - you can post your queries on Mainframe COBOL, VS COBOL II, COBOL/370 , Enterprise COBOL

Moderators: dbzTHEdinosauer, Moderator Group

Post Reply
ajayvamsi
Member
Posts: 2
Joined: Sun Feb 26, 2006 11:28 am
Location: vijayawad

EVALUATE ALSO

Post by ajayvamsi » Sun Feb 26, 2006 12:22 pm

Hi all,
can anyone tell me wat does ALSO stands for in EVALUATE statement
will it work like AND in IF

ex:
Evaluate A ALSO b
WHEN 9 also 8
display 'hi'
end-evaluate

is this similar to IF A = 9 AND B = 8
Have a nice day

User avatar
Rupesh.KOthari
Member
Posts: 17
Joined: Thu Feb 16, 2006 5:27 pm

Post by Rupesh.KOthari » Tue Feb 28, 2006 9:04 am

HI,
Hi all,
can anyone tell me wat does ALSO stands for in EVALUATE statement
will it work like AND in IF

ex:
Evaluate A ALSO b
WHEN 9 also 8
display 'hi'
end-evaluate

is this similar to IF A = 9 AND B = 8
Yes you are right, ALSO is similar to AND.

Hope this helps

Regards
Rupesh
------------------------
Thanks & Regards
Rupesh
-----------------------
Sun Shines Everywhere

Venky

Post by Venky » Fri Mar 10, 2006 1:02 pm

Hi yes you are correct...it works like AND operator

kvenkat_b4u

ALSO

Post by kvenkat_b4u » Sat Apr 22, 2006 3:21 pm

HI,

U ARE RIGHT,IT WORKS LIKE AND BUT THE DIFFERENCE IS IF THE FIRST CONDITION FAILS IT WON'T CHECK SECOND CONDITION
So unnessary checking of second condition is avoided,,so it minimise the time of execution
i.e.
A = 7
B = 8
Evaluate A ALSO b
WHEN 9 also 8
display 'hi'
end-evaluate

a value is not equal to 9 so it won't check b value

User avatar
arrbee
Active Member
Posts: 144
Joined: Fri Feb 24, 2006 11:33 am

Post by arrbee » Mon Apr 24, 2006 10:32 am

kvenkat_b4u,

When you use an AND condition it is must that you are checking for all the conditions to be true. So, what is the special about here about this? ALSO and AND are meant to be the same.

HTH.
Arr Bee
-------------
?My joy in learning is partly that it enables me to teach? - Seneca(Roman philosopher, mid-1st century AD)

User avatar
kvenkat_b4u@yahoo.com
Member
Posts: 2
Joined: Sat Apr 22, 2006 3:07 pm
Location: chennai

ALSO

Post by kvenkat_b4u@yahoo.com » Mon Apr 24, 2006 5:39 pm

hi Arrbee,


if Condition1 AND Condition2 then

even if the condition1 fails, Still it is going and checking the condition2!!!!!

if Condition ALSO Condition2 then

IF The condition1 fasil it won't check the condition2, i.e it simply ignore the codtition2!!!..What a difference

i think it's enough ,,,still u have a doubt continue the debate....
Love to learn ever..,
By,
venkat

User avatar
arrbee
Active Member
Posts: 144
Joined: Fri Feb 24, 2006 11:33 am

Post by arrbee » Tue Apr 25, 2006 1:23 pm

Ok. Any code examples do you have? How the output looked in the SYSOUT when you executed it?
Arr Bee
-------------
?My joy in learning is partly that it enables me to teach? - Seneca(Roman philosopher, mid-1st century AD)

User avatar
arrbee
Active Member
Posts: 144
Joined: Fri Feb 24, 2006 11:33 am

link.

Post by arrbee » Tue Apr 25, 2006 1:31 pm

Arr Bee
-------------
?My joy in learning is partly that it enables me to teach? - Seneca(Roman philosopher, mid-1st century AD)

padmapriya7
Member
Posts: 7
Joined: Sun Feb 05, 2006 9:31 am

Post by padmapriya7 » Wed Aug 02, 2006 12:09 pm

yes ur correct

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others