Version 4.2.6 for Mainframes
 —  Web Technology  —

Programming Tips

This section provides some tips on using the Natural Web Interface.

This section covers the following topics:


Editing in Lower Case

If you use Natural on a mainframe, you may set at your Editor the following:

Set your Editor in Lower Case

  1. Follow the following menu structure: Profile > Additional Options > General Defaults > Editing in Lower Case

  2. Enter Y in the field Editing in Lower Case.

Top of page

Quote vs. Apostrophe

To use both quote and apostrophe within your application, check the Natural parameter Translation of quotations marks (TQ). This parameter controls the translation of a quotation mark (") within a Natural text constant. It takes effect at compilation time only. Turn this parameter to OFF or use W3-QUOTE-DQUOTE.

Parameters
1 W3QUOTE            (A001) /*  o/  : Quote (")
1 W3APOSTROPHE       (A001) /*  o/  : Apostrophe (')
How To Invoke
PERFORM W3-QUOTE-DQUOTE W3QUOTE W3APOSTROPHE

Top of page

Variables defined by Value

All input variables are defined BY VALUE, this means, every value which is MOVE compatible can be used, especially constant strings.

Top of page

Access to Resources

All resources, such as pictures, sounds or Java applets, are saved at the HTTP server. If you want to create and relocate the program, do not hardcode the pathname of these resources.

When defining an environment variable, you specify the current path of the resource. The environment variable can be set at the Natural Web Server Extensions. If no variable is set, use a default setting.

Top of page

Constant Values

The parameter data area W3CONST contains some useful constant values:

##HTTP_NEWLINE

Writing to the return page, a physical new line can be created by compressing the string ##HTTP_NEWLINE into the string.

##HTTP_NEWLINE_LENGTH

The length of the string ##HTTP_NEWLINE may differ for different implementations. Use ##HTTP_NEWLINE_LENGTH if the length of ##HTTP_NEWLINE is needed.

Top of page

Creating a New Page

If your output may exceed the limits of your return page, use W3COUNTER to evaluate how may bytes are free at the return page.

Top of page

DCOM / RPC

When you write an application that works with both RPC and DCOM, there are some aspects you should consider:

Top of page