Sample for CPG5 |
Click here for Technical Description What do you have to do to display a CICS file in a browser? Program Description: The language of CPG5 is QPG, a just-in-time compiler. In the OPTIONS statement you see two options:
The Input Division describes the input of data. With the statement FILE CPGKDN DD DEF, the fields described in the Data Dictionary are imported into the program. The optional parameter DEF defines all fields of the structure CPGKDN for the program (in this sample: CUNO, NAME, CITY, ZIP). The Procedure Division contains the operations. The first statement is a sequential READ (NEXT) starting with the content of the field CUNO. The second is the output of a browser map designed with NetPage under the name of SAMPLE1. How does it work: The first 'Map' designed with NetPage is called from your browser. In that map, you start the CICS task for example by button click. The program started by click automatically imports the data from the calling browser map (driven by field name) and exports it to the map specified in the HTMLO statement. That's all. The HTML-Map, from which the QPG program is started, could look like this: It contains an input field (%CUNO) into which the key for the sequential read has to be entered. A button (%DISPLAY) is used to start a QPG-program (see description below). The following map SAMPLE1 is designed to output the result of the processing. The field names must be the same as the field names used in the program. The fields CUNO, NAME, CITY, ZIP are output fields, LOGO is a variable of the type 'Picture'. After the design, all variables have to be described. There are much more types than in a 3270-environment: Output field, Input/Output field, Button, Hyperlink, Listbox and much more. The first variable CUNO is described as an output field. A button needs different entries: The execution will run on your S/390 system, but you will start it and get your results in a browser: |
Search
|
News |
» 46th COURSE « Participants rate our 46th COURSE conference with a top grade of 1.2! Handouts can be found in our german download area. |
» CPG-Shell « IBM Z connector starts applications on other platforms |
» CPGJDBC « CPGJDBC is a daemon, that enables CICS and batch programs to process data on other platforms. |
» CPGXML « Comfortable Connector to Mainframe Data for the PC Developer based on XML |
Photos |
» Users' Conference « |