tsq or read directly from file



Support for CICS/ESA, CICS/TS & Transaction Gateway, CICS Configuration Manager and CICS Performance Analyzer

tsq or read directly from file

Postby pradeepgowda » Wed Apr 07, 2010 5:59 pm

Hi for paging logic(page down and page up) using vsam which is better from performance point

a) to read the file every time using readnext(page down) and readprev(page up)
b) to read the file and write all the records which satisfy some condition into tsq and then use tsq for paging logic
pradeepgowda
 
Posts: 40
Joined: Mon Jan 04, 2010 4:17 pm
Has thanked: 0 time
Been thanked: 0 time

Re: tsq or read directly from file

Postby Robert Sample » Wed Apr 07, 2010 7:24 pm

for paging logic(page down and page up) using vsam which is better from performance point
Perhaps if you explained what performance metrics are important to you .... CPU time? I/O time? memory usage? something else?

What is your site standard? Follow it.

Honestly, you have ALREADY wasted more time thinking about this question than you are likely to save in the next 10 years of the application, no matter which approach you use. And the approach will definitely depend upon the application. If the selection logic is complicated and not many records qualify, run through the file one time and save the accepted records in temporary storage. If the selection logic is simple and many records will qualify, just save the first and last record keys on the page and use them to implement your paging logic by reading the next (or previous) records from the file when asked.

This is not a question where one answer fits all -- the response will depend upon the circumstances. Hence your best advice is to follow your site standards.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: tsq or read directly from file

Postby enrico-sorichetti » Fri Apr 09, 2010 12:09 am

the site standards dictate the approach! but...

my personal advice is to, regardless of the complexity of file access,
always use TS for paging,
this ensures consistents displays in forw/backw paging and bottom page totals

if You page reading the file the application designers will be cursed at ,
on a reread the data might have changed, and all the numbers jotted on a pad
will have to be reworked with great joy of the end user 8-)

usually in any decently managed developing environment
the paging will be done thru TS queues
the data gathering program will not be concerned with terminal I/O,
it will simply write the formatted data to a TS queue and transfer control
to a generalized TSQ display program ( no need to reinvent the paging wheel )
written once and used everywhere
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times


Return to CICS

 


  • Related topics
    Replies
    Views
    Last post