As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I need to create an interactive form with two input fields and two output fields.
All four fields are fields of a same file from which data will be fetched. Also i want to display error messages if data not found and incorrect input values are entered and also incorporate function keys to go back.
Do you need to develop this form on your mainframe, using focus, or is it to be a web-form on the windows platform?
If it is to run under focus on mainframe, then I think you'd best go with maintain. This has all the functionality you looking for built into it. If it's to run on the web, then actually you would be best off by using webfocus maintain, but then you'd need to have the product. And if your profile is correct, you don't.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
To create a Mainframe Maintain application, from the VM or MVS command prompt, issue MPAINT. If you are in MVS, you should create a WINFORMS PDS. It has the same attributes as your FOCEXEC PDS.
You will then be prompted for the name of the application and the Master file that you want to operate on.
From there you can create a simple application that takes in the data and gives out messages. Check the Mainframe Maintain manuals on how to do this.
Mark
Posts: 663 | Location: New York | Registered: May 08, 2003
are you wanting to update a database or just display data based on the entered values? If it is the latter, you can use dialogue manager to create a form I think the command is createform. If you are wanting to update the database, you will need modify. Check your user manual.
Pat WF 7.6.8, AIX, AS400, NT AS400 FOCUS, AIX FOCUS, Oracle, DB2, JDE, Lotus Notes
Posts: 755 | Location: TX | Registered: September 25, 2007
I only want to display the retrieved data on screen. As i have said above, I have two input fields and two output fields, And when i enter the values in input fields and press enter the data should come up in the output fields. And also i want the output fields to disable the cursor on them. Please send me an example code if possible.
Sorry, I don't have an example you will have to do some research. What you are wanting is not really an interactive form you are trying to create input parameters for an online report. There are 2 ways to do this with regular Focus on the mainframe, one is to use -PROMPT the other is to create a form similar to what you would do with HTML on WebFocus. I think the start and end commands are -CRTFORM BEGIN and -CRTFORM END. everything in between will be on your form. If you don't have a user manual for your version of Focus you should be able to download one from tech support.
Pat WF 7.6.8, AIX, AS400, NT AS400 FOCUS, AIX FOCUS, Oracle, DB2, JDE, Lotus Notes
Posts: 755 | Location: TX | Registered: September 25, 2007
Example: two files, one htm and one fex. In the fex teh htm file is largely duplicated as you will see. Both reside in my app folder SESSION, and this is also where the request points to. First the htm, which you should start in the browser with the http address (I called it firoz.htm):
TABLE FILE CAR
PRINT COUNTRY
WHERE COUNTRY CONTAINS '&INFIELD1';
ON TABLE HOLD
END
-RUN
-SET &OUTFIELD1=&LINES;
TABLE FILE CAR
PRINT CAR
WHERE CAR CONTAINS '&INFIELD2';
ON TABLE HOLD
END
-RUN
-SET &OUTFIELD2=&LINES;
TABLE FILE CAR
PRINT CAR BY COUNTRY
ON TABLE HOLD FORMAT HTMTABLE
END
-HTMLFORM BEGIN
<HTML>
<BODY marginheight="20" marginwidth="20" leftmargin="20" topmargin="20">
<form name="form1" action='/ibi_apps/WFServlet' method='get'>
<input type="hidden" name="IBIF_focexec" value="firoz">
<input type="hidden" name="IBIAPP_app" value="SESSION"><br>
Input field1: <input type="TEXT" name="INFIELD1" value=""><br>
Input field2: <input type="TEXT" name="INFIELD2" value=""><br>
Output field1: <input type="TEXT" name="OUTFIELD1" value="&OUTFIELD1" readonly><br>
Output field2: <input type="TEXT" name="OUTFIELD2" value="&OUTFIELD2" readonly><br>
<br>
<input type=submit value="--> GO!">
</form>
<BR>
!IBI.FIL.HOLD;
</BODY>
</HTML>
-HTMLFORM END
Now, when you run this code, in the first field enter a searchstring for country, in the second field enter a searchstring for car. The number of records found will come up in the first and second output field.
Hope this simple example will help you get where you want to be.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
You'll need a browser and - webfocus - to run this. I did not realize you don't have this. Sorry about that. But, if it's just plain old focus you've got, then what do you mean with 'form'? If you're planning to use crtform, then yes, you can mix content, and also make fields readonly and such. I do not have any example at hand, but I recommend reading up on the crtform in the focus manual. There you'll find all that is needed to do just what you want. CRTFORM can be used in Dialog manager and in MODIY.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007