Stored procedure USERA.IOVCHAR has two parameters, an input and an output parameter which are both defined as VARCHAR 32KB character strings. The stored procedure copies the input string to the output string. You can enter your CALL statement using QMF global variables to handle the input and output parameters. The global variables can be declared before you run the CALL statement using the SET GLOBAL command. If you do not set the value prior to running the CALL statement, you will be prompted to enter a value. Issue the CALL statement on the SQL QUERY panel. Prompting will be used in the following example:
CALL USREA.IOVCHAR(&A01, &A02)
You enter your data on the lines provided in the prompt panel. You must enter a blank for the output parameter regardless of whether you use prompting or if you set the global variables before running the CALL statement.
SQL QUERY MODIFIED LINE 1 RUN Command Prompt - Values of Variables 1 to 10 of 10 Your RUN command runs a query or procedure with variables that need values. Fill in a value for each variable named below: &A01 'This is my string' &A02 ' ' F1=Help F3=End F7=Backward F8=Forward Please give a variable for each variable name.
Upon completion, you will see this message:
OK, Your Stored Procedure has successfully completed.
You can view the output parameter in the global variable pool by using the SHOW GLOBALS command:
GLOBALS Type a value for a global variable and press Enter or press a function key. Variable values may be changed if they are enclosed in parentheses or brackets. Variable Name: Value: ------------------- ------------------------------------------------ 1 to 11 of 113 A02 ( THIS IS MY STRING > DSQAO_APPL_TRACE 0 DSQAO_ATTENTION 0 DSQA)_BATCH 1 DSQAO_CICS_SQNAME DSQAO_CICS_SQTYPE DSQAO_CICS_TQNAME DSQAO_CICS_TQTYPE DSQAO_CONNECT_ID CACLARK DSQAO_CONNECT_LOC MVS1DB2M DSQAO_CURSOR_OPEN 2 1=Help 2= 3=End 4= 5=Show Field 6=Query 7=Backward 8=Forward 9=Form 10=Add 11=Delete 12=Report OK, GLOBALS IS SHOWN COMMAND ===>