Before Oracle sessions can be recorded or the DataLoad file played back, Oracle Forms must be setup to use this file. This is achieved by adding the appropriate parameter to the Oracle Forms command line, which for NCA is controlled by the URL. Since users will still want to be able to use the system without using record or playback, multiple command lines are required, each accessed via a different icon or browser link. At a minimum, in addition to the normal command line one extra will be required for recording and another for playback. On an NCA system where multiple users are using the same command line, which is in the HTML file on the middle tier, you may require multiple files for recording and multiple files for playing if more than one user wants to use this functionality at the same time.
Hint Oracle Forms can record and play at the same time. This can be useful for validating what a load has done. For instance, if you record into a new file while playing back from a DataLoad produced file, when the load completes you could open the recorded file in DataLoad to see what the playback did. Doing so means you can leave a forms playback unattended and still be able to verify what was loaded at a later date.
Hint Recording while playing also makes playback in Forms 6i much more stable! Just by turning recording on various stability issues are resolved. Comstar recommends that recording is always turned on while a file is being played back.
The changes in setup required depend upon the version of Oracle Forms you are using. Follow the appropriate link below for instructions to setup your version of Forms.
For Oracle Forms 4.5, the setup required is effectively the same whether the system is NCA or SmartClient . To enable Forms 4.5 recording the following parameter must be added to the Forms command line:
record=[PATH FILENAME]
An example of a possible parameter on Windows NT is
record=c:\dataload\record.fld
or, on UNIX this may be:
record=/home/dataload/record.fld
For NCA, a new HTM file must be created for recording and another for playback. The HTM file should edited and the following line found:
<PARAM name=serverArgs" value="module=... userid=... fndnam=apps">
The record parameter should then be added to the end of this line, between the "fndnam=apps" parameter and the closing double quote. For instance:
<PARAM name=serverArgs" value="module=... userid=... fndnam=apps record=c:\temp\record.fld">
The filename and path after the record parameter can be anything appropriate to your system. DataLoad uses the file extension ".fld" for forms playback files (Form LoadD) so it is a good idea to use that extension. To get Oracle Forms to replay your forms playback file another HTM file must be created. To this you add a parameter in the same way as before but it is called "play", as in the following example:
<PARAM name=serverArgs" value="module=... userid=... fndnam=apps play=c:\temp\record.fld">
NCA users will require different URLs to access the different HTM files, whereas Smart Client users should add these parameters to their end of their F45RUN32.exe command line(s).
To setup Forms record and playback in Oracle Forms 6.x two files need to be edited, appsweb.cfg and appsbase.htm, then a parameter is added to the URL used to access the Applications. This parameter controls recording or playback and defines where the DataLoad forms load file is located. The steps to setup Forms 6.x forms playback are as follows:
Edit the $OA_HTML/bin/appsweb.cfg file.
By default, Forms 6i does not display the actual forms in the client session, it only displays the parent window. This is to facilitate server capacity testing, however for DataLoad playback it is very useful to be able to see what the load is doing. To enable this the code parameter must be changed. Find the section called '; 2) Java Client Code Parameters'. This section will contain the following line:
code=oracle.forms.engine.Main
Rather than using 'Main' we need to use 'MainRT', so the line should be edited to resemble the following:
code=oracle.forms.engine.MainRT
The playback will now be shown in the client session.
Next, in the section called '6) Special Functionality Parameters' make sure the record parameter has no value, as below:
record=
By setting this parameter to have no value forms recording is enabled but not automatically turned on. A play parameter also needs to be added so that playback is enabled but not automatically run. Again this should have no value and will be as follows:
play=
Whereas the record parameter may already be in the appsweb.cfg file the play parameter probably won't be, however this is dependant on what Oracle are shipping.
Next, the HTML file must be edited. The name and location of this file is defined by the the baseHTML parameter in the appsweb.cfg file, but by default will be $OA_HTML/US/appsbase.htm. Open this file in your preferred text editor and find the following lines:
// Special Function Parameters
// ---------------------------
var xrecord = "%record%"
Now add a variable for the play parameter immediately below the xrecord variable. This should be as follows:
var xplay = "%play%"
The xplay variable will hold the value of the play parameter used in the URL. The HTML file now needs to be altered to use this variable. Find the following line in the HTML file:
MAChtml += '<' + 'PARAM name="serverArgs" value="module=' + xmodule + ' userid='+ xuserid + ' fndnam=' + xfndnam + ' record=' +xrecord;
If the code "+ ' record=' +xrecord" is included in this line then it should be removed, as shown below:
MAChtml += '<' + 'PARAM name="serverArgs" value="module=' + xmodule + ' userid=' + xuserid + ' fndnam=' + xfndnam ;
This code is removed because the record or play parameters should be added when one of them has a value. Oracle appear to have shipped some versions of the HTML code which contain the 'record' parameter included but others do not. If the parameter is included it should be removed.
Once the record parameter has been removed code needs to be inserted which will add the record or play parameter to the HTML if either parameter has a value, i.e. if either xrecord or xplay is not empty. Insert the following code to achieve this:
if (xrecord != "") {
MAChtml += ' record=' + xrecord;
}if (xplay != "") {
MAChtml += ' play=' + xplay;
}
Certain HTML files shipped by Oracle already contain the first of these statements, i.e. the files that do not contain the record parameter in the MAChtml line will contain the first of these statements. Whatever is shipped, ensure the two statements shown above are included in the file.
The changes made so far will affect Macintosh users. These changes now need to be made for Internet Explorer and Netscape users. These sections can be identified by the use of the variable IEhtml and NShtml, for Internet Explorer and Netscape respectively, instead of MAChtml.
Finally, a change needs to be made for users who are using their browser's native Java Runtime and not JInitiator. Locate the following line in the HTML file:
<PARAM name=serverArgs value="module=%prodTop%/forms/%lang%/%formName% userid=%userid% record=%record% log=%log% fndnam=%fndnam% %form_params%">
In some versions of the HTML file the line won't contain the text ' record=%record%', in which case it will look like the following:
<PARAM name=serverArgs value="module=%prodTop%/forms/%lang%/%formName% userid=%userid% log=%log% fndnam=%fndnam% %form_params%">
Whatever is currently included in that line, you need to ensure it contains both the record and play parameters. Once those parameters have been added the line will be as follows:
<PARAM name=serverArgs value="module=%prodTop%/forms/%lang%/%formName% userid=%userid% record=%record% play=%play% log=%log% fndnam=%fndnam% %form_params%">
If all these changes are made then record and playback will work and will be available for all clients.
To record a forms playback file the record parameter should be added to the end of your base URL. The base URL will resemble the following:
To record a file the following should be added to the end of the URL, where [filename] should be replaced with a real filename:
?record=[filename]
The following shows an example format of a typical record URL:
http://host.domain.com:8000/dev60cgi/f60cgi?record=record_file.fld
To then playback what was previously recorded the following URL would be used:
http://host.domain.com:8000/dev60cgi/f60cgi?play=record_file.fld
The file named in the URL will be located in the directory where the forms server was started. If the file should be in a different directory then the full directory path should be included in addition to the file's name.
It can be useful to record a file at the same time as playing. This provides a record of your load which can be checked later to ensure the load was successful. Extra parameters, such as record, can be added to the URL if they are preceded by a '&'. The following URL is an example which would playback from one file while recording to another:
http://host.domain.com:8000/dev60cgi/f60cgi?play=suppliers.fld&record=suppliersloaded.fld
Finally, if you wanted to log the playback as well as recording, perhaps in case there is an intermittent forms error you want to capture, then the following URL could be used: