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
 

 

need logic for searching of records using pf7 and pf8 keys.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
elango

New User


Joined: 27 Apr 2005
Posts: 12
Location: chennai

PostPosted: Wed Apr 27, 2005 10:51 am    Post subject: need logic for searching of records using pf7 and pf8 keys.
Reply with quote

we want the coding for this search logic.

records from the table can be fetched by using pf7 key for backward search and pf8 key for forward search from any given record number.

can any one help us as much as possible..

regards

elango :lol:

<<<Mail- ID Removed>>> READ FORUM RULES.
Back to top
View user's profile Send private message

squid_rocks

New User


Joined: 21 Mar 2005
Posts: 15
Location: Pune, INDIA

PostPosted: Wed Apr 27, 2005 2:25 pm    Post subject:
Reply with quote

Hi,
Can you specify more details like where are you searching from, etc.
I guess what you are trying to devlope is a browsing program, or something like it.
Well, for using PF7 and PF8 keys, what you need to do is, use DFHPF7 and DHFPF8.
These are the DFHxxx values, if the use had pressed PF7, then DFHPF7 will be true and so on. So you need to use Evaluate of If statement to find out whether PF7 or PF8 has been pressed.
Then, if these keys are pressed, you will need to code logic like search (more details needed here).
If the file is a small one, then you may want to maintain a copy of the file in TSQ. That way, we can access them using ITEM option with READQ TS.
Or if you are using a DB then we need to code the logic that way.

Hope it helps.
Please post more details so we can help you further.
Back to top
View user's profile Send private message
elango

New User


Joined: 27 Apr 2005
Posts: 12
Location: chennai

PostPosted: Wed Apr 27, 2005 4:27 pm    Post subject: Re: need logic for searching of records using pf7 and pf8 k
Reply with quote

Dear squid_rocks,

Thanks for Ur replay.Iam explaing my task clearly....

For example a db2 table consists of employee information?s about 100 records. I want to search the information in this way...

I will give a particular employee number and press pf8 key. Then it should display five records after that record, for example if i enter employee id 51 means it should display all the information in the map from employee id's 51 to 55.Like that if i press pf7 means it should traverse back and display records from 47 to 51 and so on.
For that I want do design a CICS map in a way that it should hold five rows of information at a time. Here is my another problem that how can we use occur class in designing maps? I don?t know the above logics.
I need some sample coding for this search logic and also coding for declaration of a CICS map with occurs clause.
Plz help me


Regards
Elango
elango_rs@rediffmail.com
Back to top
View user's profile Send private message
ankyhunk

Moderator


Joined: 05 May 2005
Posts: 98
Location: Navi Mumbai, India

PostPosted: Mon May 09, 2005 5:05 pm    Post subject:
Reply with quote

Regarding designing your Map - You can display a group variable(01 level) & put the fields in it. e.g.
01 Employee Occurs 5 times.
05 Name
05 Salary etc

Regarding display - Whenever the user put the key values and presses enter the program shoots the query & the o/p is written to a VSAM file. Then whenever user presses PF keys for display you can show the records using STARTBR, READPREV & READNEXT.

For details refer to CICS manuals.
Back to top
View user's profile Send private message
ankyhunk

Moderator


Joined: 05 May 2005
Posts: 98
Location: Navi Mumbai, India

PostPosted: Mon May 09, 2005 5:40 pm    Post subject:
Reply with quote

Whenever we have to display records either in forward or backward direction from a database, there are 2 options -
1) Shoot the query everytime user presses PF key
2) Shoot the query once & write the output to a KSDS file and read it on every key press accordingly.
Correct me if I am wrong.
Back to top
View user's profile Send private message
sundaresanjs

New User


Joined: 29 May 2006
Posts: 18
Location: USA

PostPosted: Tue Jun 27, 2006 10:05 pm    Post subject:
Reply with quote

but sir,

This is Sundaresan, i have used the options which u have given, but it doesn't work properly,

i am reading a ksds file for the browse and first reading the first 10 records in it, and now if i press f8 it should display the next 10 records instead it goes to exit
how can i rectify it

Regards,
Back to top
View user's profile Send private message
joshua1983

New User


Joined: 25 May 2006
Posts: 7
Location: Mumbai, India

PostPosted: Wed Jun 28, 2006 11:03 am    Post subject: Re: need logic for searching of records using pf7 and pf8 k
Reply with quote

hi elango icon_smile.gif

while desigining the map, u have create an array of variables of required size which I assume tat u know it.....

now for displaying records 51 to 55...(in case u input 51 and press enter)

then

Evaluate EIBAID

when enter key

TSQ-ITEM = 51
PERFORM SCROLL-FORWARD-PARA

END-EVALUATE

SCROLL-FORWARD-PARA.

EXEC READQ
ADD 1 TO TSQ-ITEM


if u have not got the above clearly then do ask me specifically where u didnt get....
Back to top
View user's profile Send private message
sundaresanjs

New User


Joined: 29 May 2006
Posts: 18
Location: USA

PostPosted: Sun Jul 09, 2006 10:27 am    Post subject:
Reply with quote

hai,

i have posted a logic for the need u asked, in the name ' Logic for scroll up and scroll up', u can verify it,

correct me if any errors,

regards,[/list]
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 -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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