View previous topic :: View next topic
|
Author |
Message |
pulsar
New User
Joined: 08 Nov 2007 Posts: 7 Location: India
|
|
|
|
The below menioned SQl query works fine in QMF / SPUFI.
But when I Execute the same code through a EZTRIEVE program, I am not getting desired results.
Is there any limitaion in using the SQL LIKE predicate in EZTRIEVE.
Please Guide.
Code: |
SELECT * FROM TABLE1
WHERE
COLUMN1 LIKE '%ADD%'
|
|
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
What does the EZT code look like and what do you mean by "not getting desired results"? |
|
Back to top |
|
|
pulsar
New User
Joined: 08 Nov 2007 Posts: 7 Location: India
|
|
|
|
I am using cursor in my EZT program.(My EZT pgm is a seperate element, used in a JCL through IKJEFT01 utility)
I am sure that syntax wise there are no issues.
When i execute my query without the LIKE part, the results are fine(ie, I get matching rows in the table). But when i include LIKE in my query, i m unable to find match in the table.
I wanted to know whether using "LIKE' in a EZT
Please let me know if further details are required. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If you post your ezt (as requested) it may help.
Quote: |
I am sure that syntax wise there are no issues. |
That is no reason for not posting the code. . .
Quote: |
The below menioned SQl query works fine in QMF / SPUFI. |
and does not use a cursor. . .
Do you have any ezt/sql that uses a cursor that works successfully? Do you have any cursors that use "like" that are working in cobol or some other language?
Which release of Easytrieve are you using? Things that work one way don't always work the same in another dut ro fixes and enhancements. |
|
Back to top |
|
|
pulsar
New User
Joined: 08 Nov 2007 Posts: 7 Location: India
|
|
|
|
Apologies for giving incomplete information.
Hope the below mentioned details are fine. Please let me know if I am missing anything !
Cursor Declaration:
Code: |
SQL DECLARE C1 CURSOR FOR +
SELECT TRANS_MSG +
FROM ERROR +
WHERE DATE > :WS-TIME1 +
AND DATE < :WS-TIME2 +
AND ( MSG LIKE '%|ADD|%' OR +
MSG LIKE '%|MOD|%' OR +
MSG LIKE '%|DEL|%' OR +
( MSG LIKE 'ACCOUNT|%' AND +
( MSG1 = 'CHG' OR +
MSG1 = 'NOC' OR +
MSG1 = 'CAN' ) ) ) +
AND STATUS = 'ERROR' +
WITH UR
|
EZT
Code: |
SQL OPEN C1
FLAG = 'C1-OPEN'
PERFORM CHECK-SQL-CODE
DO WHILE SQLCODE = 0
SQL FETCH C1 INTO :OUT-TRANS-MSG
FLAG = 'C1-FETCH'
PERFORM CHECK-SQL-CODE
IF SQLCODE EQ 0
PERFORM WRITE-OUTPUT
COUNT = COUNT + 1
END-IF
END-DO
SQL CLOSE C1
FLAG = 'C1-CLOSE'
PERFORM CHECK-SQL-CODE
DISPLAY 'TOTAL RECORDS PROCESSED' COUNT
|
The query executes with a SQLCODE 100. (But there are matching rows in table when the same code is executed in SPUFI.)
When we execute the EZT PGM using EZTPA00 utility, the results are fine. We face issues only if we execute using IKJEFT01.
The version we are using is CA-EASYTRIEVE PLUS-6.3 0108. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
When we execute the EZT PGM using EZTPA00 utility, the results are fine. We face issues only if we execute using IKJEFT01. |
Why is a tso batch session being started to run your easytrieve? EZTPA00 is the normal way to execute |
|
Back to top |
|
|
pulsar
New User
Joined: 08 Nov 2007 Posts: 7 Location: India
|
|
|
|
d.sch,
We are in a need to use IKJEFT01.
If there is no solution, we will have to go back to EZTPA00. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
We are in a need to use IKJEFT01. |
What need to run ezt under tso in batch? Yours is the first time i've ever seen this as a requirement.
If you explan what is actually needed, someone may be able to help. If it is to be "magic" we probably can't help.
I suspect your best alternative is to run ezt as a process in jcl not under tso. |
|
Back to top |
|
|
pulsar
New User
Joined: 08 Nov 2007 Posts: 7 Location: India
|
|
|
|
d.sch.,
Thanks for your time.
We have decided to use EZTPA00. |
|
Back to top |
|
|
|