Conversion Summary



All Applications


Table 1. Configuration

Configuration Area

Notes

Data dictionaries

Run dd5to6 to create a JAM 6 data dictionary (data6.dic) and, optionally, an LDB (ldb.lib). Set SMLDBNAME = new name if you have not named it ldb.lib.

Groups

Groups are not loaded as part of repositories and LDBs. Hence, groups must be re-established via the screen editor.

Key files

New keys have been added.

LDB Initialization Files

Perform one of these actions:

- Compile and link sm5ldb.c to the application and call sm5_ldb_init in main.

- Move SMININAMES from the setup file to either environment or sm_ininames call.

- Edit the file by changing: "field" "value" to field="value"; include this file in your startup JPL code.

- Remove these fields from the data dictionary and make them global JPL variables.

Menu bar files

Run m2asc -c to convert to JAM 7 format.

Message file

Fold in changes made to JAM 5 message file.

SMVARS and SMSETUP

Fold in changes made to JAM 5 files. DBI4COMPATIBLE is no longer supported.

Video file

While the format of these files remains the same, the content of the JAM 7 files might be different, resulting in different appearance (e.g. graphic characters).

screen libraries

Extract all screens from the library. Run f5to6 on each screen. Reconstruct the library.

Italics indicate options that are supported for backward compatibility only.

Table 2. Executable

Area

Notes

Block mode

Not available in this release.

Memory-resident screens

Run f5to6 on the original screen. Run bin2c. Reconstruct the header file.

funclist.c

Fold in changes made to your JAM 5 funclist.c.

If your application does not routinely enclose each function argument in quotes, turn off the DEREF_ARGS flag in SM_INTFNC, SM_STRFNC and SMDBLFNC macros (see SM_OLDFNC) to turn off dereferencing of field names on function call lines.

Makefile

Use the supplied makefile, folding in changes made to your JAM 5 makefile. Compare your JAM 5 file with the distributed JAM5 file to discover your changes.

Main routine

Use the supplied jmain.c, folding in changes made to your JAM 5 jmain.c. Compare your JAM 5 file with the distributed JAM5 file to discover your changes.

Table 3. Library functions

Function

Notes

sm_bkrect

Obsolete, but still supported.

sm_blkinit

Block mode not supported.

sm_blkreset

Block mode not supported.

sm_i_bitop

Fails on array fields.

sm_c_keyset

Soft keys not supported.

sm_dicname

Link your application with sm5ldb.c.

sm_do_region

Obsolete, but still supported.

sm_edit_ptr

Use sm_prop_get.

sm_emsg

Use sm_femsg.

sm_err_reset

Use sm_ferr_reset.

sm_getjctrl

Use sm_prop_get.

sm_ininames

Link your application with sm5ldb.c.

sm_initcrt

Use sm_jinitcrt.

sm_jplload

Use sm_jplpublic.

sm_keyset

Soft keys not supported, use menu bars instead.

sm_kscscope

Soft keys not supported, use menu bars instead.

sm_ksinq

Soft keys not supported, use menu bars instead.

sm_kson

Soft keys not supported, use menu bars instead.

sm_ksoff

Soft keys not supported, use menu bars instead.

sm_lclear

Link your application with sm5ldb.c.

sm_ldb_hash

Link your application with sm5ldb.c.

sm_ldb_init

Link your application with sm5ldb.c.

sm_ldbrevive

Link your application with sm5ldb.c.

sm_ldbsave

Link your application with sm5ldb.c.

sm_lreset

Link your application with sm5ldb.c.

sm_r_menu

Link your application with sm5mbar.c.

sm_d_menu

Link your application with sm5mbar.c.

sm_c_menu

Link your application with sm5mbar.c.

sm_mnadd

Link your application with sm5mbar.c.

sm_mnchange

Link your application with sm5mbar.c.

sm_mndelete

Link your application with sm5mbar.c.

sm_mnget

Link your application with sm5mbar.c.

sm_mninsert

Link your application with sm5mbar.c.

sm_mnitems

Link your application with sm5mbar.c.

sm_mnnew

Link your application with sm5mbar.c.

sm_mnutogl and jm_mnutogl

Menu and input modes are no longer relevant. Push buttons (formerly menus) always execute an action when activated, and can be tabbed into from other fields. To restore JAM 5 behavior, set AUTO_TOGGLE = AT_DISABLE in the setup file or call sm_option.

sm_perm_emph

No longer supported.

sm_putjctrl

Use sm_prop_set.

sm_qui_msg

Use sm_fqui_msg.

sm_rd_part

Link your application with sm5strct.c.

sm_rdstruct

Link your application with sm5strct.c.

sm_rrecord

Link your application with sm5strct.c.

sm_skinq

Soft keys not supported, use menu bars instead.

sm_skmark

Soft keys not supported, use menu bars instead.

sm_skset

Soft keys not supported, use menu bars instead.

sm_skvinq

Soft keys not supported, use menu bars instead.

sm_skvmark

Soft keys not supported, use menu bars instead.

sm_skvset

Soft keys not supported, use menu bars instead.

sm_submenu_close

Use menu bars instead.

sm_wrecord

Link your application with sm5strct.c.

sm_wrt_part

Link your application with sm5strct.c.

sm_wrtstruct

Link your application with sm5strct.c.

Italics indicate options that are supported for backward compatibility only.

Table 4. JPL

Area

Notes

Comments

The : character is no longer supported for comments.

Keywords

JAM 7 introduces the following new keywords:
double
global
string
send
receive
runreport
tpi
For ease of recognition, avoid using these as program variables.

Loop variables

These are no longer floating point numbers (e.g. JAM 5 = 1.00; JAM 6 = 1).

unload

An error is now generated when unload is issued for a file which was not previously loaded. Use call sm_jplunload ... to restore JAM 5 behavior.

sql

Obsolete. Use dbms sql instead.

Table 5. Screens

Feature

Notes

Circular arrays

Arrowing down past the last occurrence places the cursor in the first element and displays the first occurrence there. Arrowing up past the first occurrence places the cursor in the last element and displays the last occurrence there. JAM 5 did not reposition the cursor.

Cursor up/down

JAM 7 positions the cursor at the end of existing data by default when entering a widget. To restore JAM 5 behavior, set IN_RESET = OK_NORESET in the setup file or call sm_option.

Field function flags

K_KEYS always set to K_NORMAL on K_ENTRY.

Group navigation

In JAM 7, TAB and BACK position the cursor to the next field by default. To restore JAM 5 behavior, call sm_keyoption and set the TAB and BACK key bits to VF_GROUP | VF_CHANGE.

Group function flags

The MDT bit is not set when a member is selected. K_KEYS is always set to K_NORMAL on K_ENTRY.

Menus with control fields

Control fields are replaced by the control string property. There are two possible conversions via f5to6. The first is to use f5to6 -5 to retain control field functionality via the Release 5 widget type. The second is to use f5to6 -c to set the Control String property from the control field data, provided that its number of occurrences matches that of the menu field. Code that modifies the control fields must be changed to call property API functions.

Menus with return codes

To push back a key, call jm_keys from the control string property.

Multiple range edits

New widgets may only have one range. Use the validation function for complex range evaluation.

Submenus

Use menu bars instead.

Tabbing order

JAM 7 uses the alt_next_tab_stop property only when the field specified in its next_tab_stop property does not exist. If the next field is protected, then its designated next field is used. To restore JAM 5 behavior, set JAM5_COMPATIBLE = JAM5_ON in the setup file or call sm_option.

Scrolling date/time fields

All occurrences in a scrolling array with a system date/time edit will fill with data once they are allocated. In JAM 5, only the first element was filled.

Soft keys

Soft keys are not supported. f5to6 -m copies the keyset name into the menu bar property.

Zoom

If you map the NL key to TAB, you will not be able to add new lines at the end of an array. Use insert key instead. Remap NL to NL before invoking zoom.

Italics indicate options that are supported for backward compatibility only.

Table 6. Processing

Area

Notes

AUTO key

In JAM 7, this event occurs after entering first field. In JAM 5 it occurred before.

Custom executive

If menu return codes are used, call jm_keys and sm_keyoption to change key routing.

Key remapping

Mouse clicks generate NL and DELE keys which will be remapped as if they had been entered from the keyboard. Use a default field function to reset remappings on entry and restore them on exit from menu fields.

Menu vs. input mode

Menu and input modes are no longer relevant. Push buttons (formerly menus) always execute an action when activated, and can be tabbed into from other fields. To restore JAM 5 behavior, set AUTO_TOGGLE = AT_DISABLE in the setup file or call sm_option.

Screen entry/exit hooks

Activation on expose/hide is now the default. To restore JAM 5 behavior, set EXPHIDE_OPTION = OFF_EXPHIDE in the setup file or call sm_option.

Status line hook

Does not get called for messages now displayed via sm_message_box. Use ERROR_FUNC to trap all messages excluding setbkstat, d_msg and query.

This event takes place before translation of % escapes.

Italics indicate options that are supported for backward compatibility only.

Table 7. Menu Bar

Item

Notes

empty items

No longer supported. JAM 7 displays the parent button when a child menu has no recognizable contents.

title

No longer supported. It will not appear on menus.

Table 8. Utilities

Utility

Notes

dd2struct

No longer supported. Use the dd2rec utility to generate record definitions.

f2asc

Text format changed.

f2struct

No longer supported. Use f2struct supplied in sample code.

f2tbl

Not available in this release.

lstform

No longer supported.

menu2bin

Replaced by m2asc. Text format changed.

modkey

Replaced by showkey utility. Since key file formats remain the same, the JAM 5 utility may still be used for those keys that aren't new.

term2vid

Not available in this release.

text2form

Not available in this release. Use the JAM 5 utility and load the generated screens directly into JAM 7 or pass them through f5to6 for conversion.

Italics indicate options that are supported for backward compatibility only.


GUI Applications


Table 9. Configuration

Area

Notes

Environment variables

In Motif, XNLSPATH may be required for some implementations.

Color aliases

Color aliases currently defined in resource files must be moved to the JAM configuration map file. To mimic JAM 5 behavior, set the Color Type property for all widgets and screens to Scheme and either remove [Scheme] settings from the configuration map or set all BG and FG scheme colors to GUI equivalents (e.g. XJam.Background).

Table 10. Screen, general

Feature

Notes

Automatic widget type changes

The JAM/Pi widget conversion algorithm formerly determined widget types based on protection. In JAM 7, widget types do not change at runtime. Therefore, changes in protection do not change widget type.

Blank push buttons (menu fields)

Blank push button widgets are no longer invisible. If you want widgets to disappear and reappear, use the following code:

In JPL:

field-spec->hidden = PV_YES
field-spec->hidden = PV_NO

In C:

id = sm_prop_id (field-spec);
sm_set_prop (id, PR_HIDDEN, PV_YES);

sm_set_prop (id, PR_HIDDEN, PV_NO);

A more GUI-like behavior is to make the button inactive by toggling its active property.

Button label text

In Motif, the label is centered based on resource settings. In Windows, the label is always centered.

Table 11. Screen, Pi extensions

Feature

Notes

colorpriority

Sets the Color Type property of Foreground and Background to Scheme.

frame, box

Margin no longer supported.

hline, vline

May need to be repositioned.

hoff, voff

Not converted.

iconify

Iconifies a screen even if there is no icon specified.

list

Default horizontal and vertical scroll bars translated to no scroll bars.

multiline

These are converted to push buttons, and the additional text is truncated.

multitext

Default horizontal and vertical scroll bars translated to no scroll bars.

noadj

Colon expansion is no longer supported.

nomove

No longer supported.

space

Colon expansion is no longer supported.

Colon expansion

Colon expansion of variables might not occur at the same time as in JAM/Pi,

Widget position

The JAM 7 positioning algorithm may change widget positions. Inspect your converted screens and make appropriate adjustments.

Table 12. Processing

Area

Notes

Changing field colors

Calls to sm_chg_attr that set field colors to match the screen colors (e.g. unhighlighted black) should be changed to set the colors to the expected color or to the container color (via the B_INHERITED attribute mask). JAM no longer automatically propagates screen colors to fields when the attributes match.

Table 13. Library functions

Function

Notes

sm_widget

In Motif, use sm_xm_widget.
In Windows, use sm_mw_widget.

Also, the include files required by these functions changed to smmwuser.h and smxmuser.h.

sm_attach_drawing_func

In Motif: sm_xm_attach_drawing_func.
In Windows: sm_mw_attach_drawing_func

Note that a 3rd argument for a user data buffer has been added to these functions.

Also, the include files required by these functions changed to smmwuser.h and smxmuser.h.

sm_drawingarea

In Motif, use sm_xm_drawingarea.
In Windows, use sm_mw_drawingarea.

Also, the include files required by these functions changed to smmwuser.h and smxmuser.h.


Character Applications


Table 14. Screen

Feature

Note

Clear on input

Field is selected if data is present.

Groups

The appearance of JAM 5 checkboxes on JAM 7 radio button and check box widgets has changed from _ to either ( ) or [ ]. The f5to6 utility attempts to reposition the group so that brackets appear around the old check box position.

Because these extra characters are now considered part of the original field width, the initial text might be truncated by the conversion process, requiring you to manually reset the values. f5to6 cannot automatically resize the widgets since it might cause unintentional overlapping of widgets or push widgets off the screen. Use f5to6 -5 to retain the old appearance through a Release 5 widget type.

Menu Fields

These are now push buttons so they are not set to reverse video when the cursor enters. Use f5to6 -5 to retain old behavior through the Release 5 widget type.