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
 

 

CLIST vs REXX & Executing SQL Query using CLIST

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: CLIST vs REXX & Executing SQL Query using CLIST
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: 8593
Location: Back in jolly old England

PostPosted: Tue Aug 11, 2009 4:02 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Aug 11, 2009 4:20 pm    Post subject:
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    Post subject:
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: 1219
Location: Israel

PostPosted: Tue Aug 11, 2009 8:07 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Tue Aug 11, 2009 8:17 pm    Post subject: Reply to: CLIST vs REXX & Executing SQL Query using CLIS
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 12, 2009 11:16 am    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 12, 2009 11:26 am    Post subject:
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

Active Member


Joined: 07 Feb 2009
Posts: 984
Location: Oostende, Belgium

PostPosted: Wed Aug 12, 2009 11:28 am    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 12, 2009 11:48 am    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 12, 2009 12:12 pm    Post subject:
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: 1219
Location: Israel

PostPosted: Thu Aug 13, 2009 1:54 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm


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