Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Help needed on Using LIKE predicate in EZTRIEVE

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: Help needed on Using LIKE predicate in EZTRIEVE
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: 2150
Location: At my coffee table

PostPosted: Sat Sep 20, 2008 8:10 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Sun Sep 21, 2008 1:29 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Mon Sep 22, 2008 8:46 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Tue Sep 23, 2008 9:36 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Testing rerad cursor for status with ... John F Dutcher DB2 8 Fri May 19, 2017 9:35 pm
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts Help Needed with View Direct shailesh_do CA Products 2 Wed Jul 13, 2016 10:39 am
No new posts Information needed on using the COBAN... venugopal.dondla COBOL Programming 5 Thu Oct 08, 2015 3:34 pm
No new posts Help needed in Conditional statement ... vinu78 DB2 5 Tue Sep 15, 2015 10:14 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us