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

CLIST vs REXX & Executing SQL Query using CLIST


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
MFSubbu

New User


Joined: 16 Feb 2008
Posts: 19
Location: Bangalore

PostPosted: Tue Aug 11, 2009 3:56 pm
Reply with quote

Hi All,

I have a good knowledge in REXX and I am very new to CLIST. I have to develop a tool. I have few questions...

1) I have to read a table, display the data in panel and do scrolling(PF7, PF8, PF10 etc...).. Which will be a better option CLIST or REXX...
2) Can we execute a SQL Query using CLIST.. if yes,, can you provide me with a sample program...
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Aug 11, 2009 4:02 pm
Reply with quote

REXX will be by far the better option.
Back to top
View user's profile Send private message
MFSubbu

New User


Joined: 16 Feb 2008
Posts: 19
Location: Bangalore

PostPosted: Tue Aug 11, 2009 4:17 pm
Reply with quote

Thanks expat... Just feeling curious to know the reason behind REXX as the better option...
Any answer for the second question???
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Aug 11, 2009 4:20 pm
Reply with quote

REXX is far easier to code, and to maintain, has more functionality, has its own DB2 interface.

2nd question - probably, but I wouldn't even consider looking for it.
Have you tried google
Back to top
View user's profile Send private message
MFSubbu

New User


Joined: 16 Feb 2008
Posts: 19
Location: Bangalore

PostPosted: Tue Aug 11, 2009 4:24 pm
Reply with quote

Yes i tried that as well.. It didnt fetch valuable result... and hence i thought of asking the experts here...
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Tue Aug 11, 2009 8:07 pm
Reply with quote

There are at least 10 differences between these 2 pictures: CLIST and REXX
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Aug 11, 2009 8:17 pm
Reply with quote

Quote:
Can we execute a SQL Query using CLIST..


NO
Back to top
View user's profile Send private message
MFSubbu

New User


Joined: 16 Feb 2008
Posts: 19
Location: Bangalore

PostPosted: Wed Aug 12, 2009 9:46 am
Reply with quote

Thanks to all for ur response..

In my first question - "I have to read a table, display the data in panel and do scrolling(PF7, PF8, PF10 etc...).. ".. How can i implement scrolling in REXX...
Any sample program will be so helpful....
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 12, 2009 11:16 am
Reply with quote

Quote:
How can i implement scrolling in REXX...

Please explain in detail what this means.
Back to top
View user's profile Send private message
MFSubbu

New User


Joined: 16 Feb 2008
Posts: 19
Location: Bangalore

PostPosted: Wed Aug 12, 2009 11:22 am
Reply with quote

I need to fetch data from DB2 Table... and should display it in panel...
The table is huge with large no of data... and so i should be able to use PF7,PF8,PF10,PF11 keys to scroll through the data in the panel....

Sample program to implement PF keys funtionality will be very helpful
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 12, 2009 11:26 am
Reply with quote

Why not just browse the dataset created either by the fetch, or a reformatted version, and use the built in PF keys asis.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Wed Aug 12, 2009 11:28 am
Reply with quote

MFSubbu wrote:
The table is huge with large no of data...


Are you aware that you can use ISPF panels in compiled languages, REXX is good for working with small amounts of data, not huge DB2 tables...
Back to top
View user's profile Send private message
MFSubbu

New User


Joined: 16 Feb 2008
Posts: 19
Location: Bangalore

PostPosted: Wed Aug 12, 2009 11:37 am
Reply with quote

expat: after displaying the data in the panel.. i need to do further processing by selecting any row.... so for that i need the data to be displayed in the panel...

prino: Thanks for suggestion to improve performance.. What i said is one of module.. which i can try that with any compiled language... but i have few more requirement with small no of data.. but the no of data will not fit in one screen(panel).. so i need to have PF7, PF8, PF10,PF11 funtionality in my panel...

Please help...
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 12, 2009 11:48 am
Reply with quote

What have you tried so far and which problems have you encountered.
Back to top
View user's profile Send private message
MFSubbu

New User


Joined: 16 Feb 2008
Posts: 19
Location: Bangalore

PostPosted: Wed Aug 12, 2009 12:08 pm
Reply with quote

to start with.. i created my own ISPF table and tried using TBDISPL to display the data in the table..( I am not sure if this is the efficient method)... I have 30 records in the table.. and it is displyaing first 10 records in my panel and if I use the DOWN command it is returning with RC 8. Just today i started working on ISPF tables.. following is the prog i coded..
Code:

CALL OPEN_TABLE                                     
'TBDISPL' EMP 'PANEL('TBPANEL')'                     
'TBDISPL' EMP                                       
CALL CLOSE_TABLE                                     
CALL END_PROCESS                                     
EXIT     
                                           
OPEN_TABLE:                                         
"TBCLOSE" EMP                                       
"TBOPEN" EMP                                         
IF RC = 8 THEN SAY 'TABLE DOES NOT EXIST'           
RETURN     
                                         
CLOSE_TABLE:                                         
"TBCLOSE" EMP                                       
RETURN   
                                           
END_PROCESS:                                                                             
RETURN                                               

Please let me know what changes to be done to display all the records.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 12, 2009 12:12 pm
Reply with quote

I would guess that the problem may be in the panel definition.
Can you post that too.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Thu Aug 13, 2009 1:54 am
Reply with quote

Download this file
Print it, try the examples (mostly the Dynamic area example)...

...then you'll see why it is not made for "huge table with large no of data"...

...but maybe it is possible to fetch only the rows for the current page?
That would make it possible. More complex but possible, I think.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top