Kindly clarify -
Pls let me know how to implement scrolling logic using Tsq ?
Regarding TSQ
Moderators: DikDude, Natarajan, Moderator Group
SCROLLING LOGIC USING TSQ
TSQ - is a temporary storage queue.
I am assuming your are asking about following requirement.
- User should be able to scroll the screen using PF7 PF8 keys on
CICS screen.
For this first you need to define BMS map which show
multiple rows - Example 5 records to user.
Write cobol program to fetch records from DB2 database or a VSAM file.
scrolling comming into picture, if you fetched more record than defined
fileds in the CICS screen ( in our example 5 records on screen )
Let us assume, you program fetched 50 records.
Then write those records to TSQ.
Send map to user with first 5 records. Have hidden field in BMS
which contains value 5 in it initially.
If user press PF8 ( forward scrolling ). control comes to your CICS program
then take the hidden variable value ( now it is 5) fetch 6 record to 10th record
from TSQ and send the MAP again to user with hidden field value 10.
If user again press PF8 ( forward scrolling ). control comes to your CICS program
then take the hidden variable value ( now it is 10) fetch 11 record to 15th record
from TSQ and send the MAP again to user with hidden field value 15.
Now user pressed PF7 ( backward scrolling ) control comes to your CICS program
then take the hidden variable/field value ( now it is 15 ) .. since your want previous screen, fetch records from 6 to 10th records ( hidden field value - 10) from TSQ and send the MAP to user.
You can write this logic in one para and call that para whenever user
pressed PF7 and PF8 keys.
Instead of hidden field you can use CICS COMMAREA to store hidden value.
I am assuming your are asking about following requirement.
- User should be able to scroll the screen using PF7 PF8 keys on
CICS screen.
For this first you need to define BMS map which show
multiple rows - Example 5 records to user.
Write cobol program to fetch records from DB2 database or a VSAM file.
scrolling comming into picture, if you fetched more record than defined
fileds in the CICS screen ( in our example 5 records on screen )
Let us assume, you program fetched 50 records.
Then write those records to TSQ.
Send map to user with first 5 records. Have hidden field in BMS
which contains value 5 in it initially.
If user press PF8 ( forward scrolling ). control comes to your CICS program
then take the hidden variable value ( now it is 5) fetch 6 record to 10th record
from TSQ and send the MAP again to user with hidden field value 10.
If user again press PF8 ( forward scrolling ). control comes to your CICS program
then take the hidden variable value ( now it is 10) fetch 11 record to 15th record
from TSQ and send the MAP again to user with hidden field value 15.
Now user pressed PF7 ( backward scrolling ) control comes to your CICS program
then take the hidden variable/field value ( now it is 15 ) .. since your want previous screen, fetch records from 6 to 10th records ( hidden field value - 10) from TSQ and send the MAP to user.
You can write this logic in one para and call that para whenever user
pressed PF7 and PF8 keys.
Instead of hidden field you can use CICS COMMAREA to store hidden value.
Natarajan
Chennai
Chennai
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page