Question

I have a db2 table which contains 50 rows. How can i display this data in a cics map that i have created. Is it possible? If yes, how to accomodate 50 rows of data in my screen which has a maximum of 24 rows. Thank you

Was it helpful?

Solution

Your screen is 24 rows by 80 columns. If your row contains less than 40 columns of data, you can create a two column display. I'm assuming your CICS pages have a header and a footer, so you don't have all 24 rows anyway. You'll have to create more than one CICS page to display 50 DB2 rows.

if you can put your DB2 information in one CICS field, you can do this:

LINE  DFHMDF POS=(03,01),
             LENGTH=79,
             ATTRB=(ASKIP,NORM,PROT),
             OCCURS=20 

If you need more than one CICS field, then you have to list each line individually. There is no group OCCURS in CICS.

IBM CICS Manual

OTHER TIPS

You will have to write your own scrolling logic. This wheel has been invented many times over, and presumably has already been done in your own shop. Search for other similar transactions and maps, and copy. There is an old joke about there being only one original COBOL program and all the others were copied from it. Your task will be a lot easier by starting with something already written that performs the same thing.

Remember you will have to cope with forward and backward scrolling (traditionally PF7 and PF8 keys) and the beginning and the end of the table.

If you just want to dump the fields to a terminal, you can do an "EXEC CICS Send Text" and format the data however you want in a text string with paging supplied.

However, you say you have a map already that is constrained to a Mod-2 terminal with only 24 80 byte lines. If that is the case, your map already exists, how can you ask us how to display it? You already have the map with it's 50 fields. Populate those fields and use an "EXEC CICS Send Map".

Perhaps if you posted the map you have, or the size of the data items you wish to display, you could get a better answer...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top