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

Help needed on Using LIKE predicate in EZTRIEVE


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pulsar

New User


Joined: 08 Nov 2007
Posts: 7
Location: India

PostPosted: Sat Sep 20, 2008 4:59 pm
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sat Sep 20, 2008 8:10 pm
Reply with quote

What does the EZT code look like and what do you mean by "not getting desired results"?
Back to top
View user's profile Send private message
pulsar

New User


Joined: 08 Nov 2007
Posts: 7
Location: India

PostPosted: Sun Sep 21, 2008 12:49 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Sep 21, 2008 1:29 am
Reply with quote

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
View user's profile Send private message
pulsar

New User


Joined: 08 Nov 2007
Posts: 7
Location: India

PostPosted: Mon Sep 22, 2008 5:03 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Sep 22, 2008 8:46 pm
Reply with quote

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 icon_confused.gif
Back to top
View user's profile Send private message
pulsar

New User


Joined: 08 Nov 2007
Posts: 7
Location: India

PostPosted: Tue Sep 23, 2008 4:15 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Sep 23, 2008 9:36 pm
Reply with quote

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
View user's profile Send private message
pulsar

New User


Joined: 08 Nov 2007
Posts: 7
Location: India

PostPosted: Wed Sep 24, 2008 4:51 pm
Reply with quote

d.sch.,
Thanks for your time.
We have decided to use EZTPA00.
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 -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Mainframe Programmer with CICS Skill... Mainframe Jobs 0
No new posts Help needed to assemble IMS sample co... ABENDS & Debugging 4
No new posts RABBIT HOLE NEEDED - "Live"... All Other Mainframe Topics 0
No new posts Mainframe profiles needed @ Cognizant Mainframe Jobs 0
No new posts COBOL Student learning COBOL File Han... COBOL Programming 3
Search our Forums:

Back to Top