Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


CRTFORM equivalent in WebFocus?

CRTFORM equivalent in WebFocus?

CRTFORM equivalent in WebFocus?

Hi All,
I'm in the process of migrating some of my VM Focus applications to Webfocus 4.3.1 and I'm looking for an equivalent facility to CRTFORM, whereby a screen containing pre-determined variables can be displayed to the user, to change if necesssary, press the Enter key and the program executes. I know that using & or && variables and forcing a screen prompt can be similar but it's not the same, e.g. you cannot pre-populate a field for the user to change
and the prompts appear one at a time. With CRTFORM, they all appear at once.
Any suggestions?
Many Thanks, Peter.

RE: CRTFORM equivalent in WebFocus?

-CRTFORM is not an option in WebFOCUS.

The equvalent is going to have to be done in HTML.
The Dialogue Manager logic that treats the & variables can stay the same.

You can look into -HTMLFORM where you can put HTML into a focexec but you still need HTML coded.

In release 5.2 there is a Resource Layout tool that makes this easier.

Prior releases have Desktop intergration with MS Frontpage 2000.

RE: CRTFORM equivalent in WebFocus?

Many Thanks, Focman.
Any chance of a tiny example? I've never used/seen
-HTMLFORM but if I saw an example, I'm sure it
would be most helpful.
Thanks again, Peter.

RE: CRTFORM equivalent in WebFocus?

Here is a very basic example of how to send parameters from an HTML form (on a server) to a Focus program (in my environment, Focus 7.02 resides on an MVS mainframe).  The example below shows how to display the output of an existing Focus program in whatever output format the user selects (limited to a list of options that you provide on the HTML form).

First, the Focus program (residing on the mainframe) - using the Car file:

-             IF &FRMT EQ 'EXL2K' THEN
-               'ON TABLE PCHOLD FORMAT EXL2K'  
-            ELSE ' ';                                                 
TABLE FILE CAR                                                         
PRINT CAR COUNTRY                                                      
WHERE RECORDLIMIT EQ 10                                                

-* end of program

&FRMT is passed to the above program from the HTML form (see below).  &OUT is a simple amper variable that contains the ON TABLE PCHOLD FORMAT 'formattype' program text that will be substituted into the Table File request at the time of execution.

The HTML file looks like this:


<form action="http://servername/cgi-bin/ibi_cgi/ibiweb.exe"; method="GET">
 <input type="hidden" name="IBIF_ex" value="CARTEST">

<center><h2><font face="Arial">Car Test</font></h2></center>

    <td><font size="2" face="Arial"><b>
     Select report output option:</b></font></td>
    <td><font size="2" face="Arial">
     <select name="FRMT">
       <option selected value="BROWSER">
           Browser format</option>
       <option value="DOC">Text Document</option>
       <option value="EXL2K">Excel2000</option>

 <font face="Arial">
  <input type="submit" name="Submit" value="Run Report">
  <input type=reset name="reset" value="Reset Values">



In this form, the following lines are important:

1. <input type="hidden" name="IBIF_ex" value="CARTEST">

"CARTEST" is the name of the Focus program (Uppercase - case sensitive).

2.  <select name="FRMT">...</select>

This HTML phrase gives a name to the variable that is passed to the Focus program (with an ampersand added).

3.   <option selected value="BROWSER">Browser format</option>
           <option value="DOC">Text Document</option>
           <option value="EXL2K">Excel2000</option>

These are the options that the user sees and can select.  The default value is prefixed with 'selected', as in the first option.  The 'value' associated with the selected option is passed as the value of FRMT back to the Focus program.

When the user clicks the Submit button on the form, a URL is created that contains the Focus program name and the form variables.  These values are passed to the server (named in the 'FORM ACTION=' HTML ocde) and then on to Focus.  

The mainframe CARTEST program is executed.  The value of FRMT that was passed from the form is substituted into the Focus program and the -SET logic creates a PCHOLD statement on the fly.  The Table File request is executed and the output is delivered according to how the PCHOLD statement is created.

Hope this helps.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close