View previous topic :: View next topic
|
Author |
Message |
SOMASEKHAR REDDY Currently Banned New User
Joined: 21 Nov 2007 Posts: 14 Location: BAGALORE
|
|
|
|
01 WS-COUNT PIC 9(01).
02 WS-COUNT1 PIC 9(01).
.
.
.
PROCEDURE DIVISION
.
.
.
EXEC SQL
SELECT COUNT(*) INTO :WS-COUNT
FROM EMP TABLE
END-EXEC
.
.
ADD 1 TO WS-COUNT1
MY QUESTION IS WS-COUNT IS USING IN SQL QUERY BUT WS-COUNT1 IS NOT IS USING IN SQL QUERY
HOW I CAN IDENTIFY ONLY SEEING IN DECLARATION OF WORKING- STORAGE SECTION(WITH OUT SEEING IN PROCEDURE DIVISION) THIS WS-COUNT VARIABLE IS USING IN SQL QUERY WS-COUNT1 VARIABLE NOT USING IN SQL-QUERY IS IT POSSIBLE
please any give any one answer to me |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
only when the old-school host variable sql BEGIN DECLARE and END DECLARE statements are there, could the assumption be made. |
|
Back to top |
|
|
SOMASEKHAR REDDY Currently Banned New User
Joined: 21 Nov 2007 Posts: 14 Location: BAGALORE
|
|
|
|
I HAVE ANSWERED LIKE THAT BUT he he not decalred between declare and end decalre
he will declare only like normal vraible declare. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Do a search of the source code and see where it is used! |
|
Back to top |
|
|
SOMASEKHAR REDDY Currently Banned New User
Joined: 21 Nov 2007 Posts: 14 Location: BAGALORE
|
|
|
|
by seeing only workin-storage section |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Some questions are so stupid that they can not be answered, if you can't look at the procedure division you can't really tell how anything in working storage is used. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
FWIW - the code shown is invalid and would not compile. . . |
|
Back to top |
|
|
SOMASEKHAR REDDY Currently Banned New User
Joined: 21 Nov 2007 Posts: 14 Location: BAGALORE
|
|
|
|
I didn't get could you please explai detail.....pleasee |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
using the subject as a question
SOMASEKHAR REDDY wrote: |
Post subject: I didn't get could you please explai detail.....pleasee |
does not really make it easy to determine the purpose of your post.
FWIW, why don't you try compiling?
also, it it time to start reading the manual.
the count function returns a large integer |
|
Back to top |
|
|
SOMASEKHAR REDDY Currently Banned New User
Joined: 21 Nov 2007 Posts: 14 Location: BAGALORE
|
|
|
|
that question is interview question of value source technology.this question is asked to one of my friend by interviewer.
i think that is stupid question only.. why pepoles asked that type of questions really i don't know |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
SOMASEKHAR REDDY wrote: |
i think that is stupid question only.. why pepoles asked that type of questions really i don't know |
Well, sometimes I feel - just tell them what they want to listen. As someone told me some time back that among many duties of his regular job one duty was "to read the programmers mind" - probably if you want to do good in an interview, read the interviewer's mind.
Once I was asked, what is KEEP in DISP?
I started - if your shop is SMS managed ...
and He started looking at his cell phone...
I was distracted on that gesture but I continued the answer...if your shop is SMS managed ...it does not make difference if you use KEEP or CATLG...
He interrupted in between and asked me what is this "SMS" in your answer?
And I ended up my interview explaining him about SMS!
Well, I was selected later - so all was well, in the end |
|
Back to top |
|
|
|