Help Text Utilities

This section describes the help text utilities supplied with Natural Construct for all supported platforms. The following topics are covered:


Introduction

To invoke a help text utility, enter its name at the Next prompt (Direct Command box for Unix). The specification window for that utility is displayed. For example, the following window is displayed when you enter "CSHUNLD":

13-10-21          *** N A T U R A L  C O N S T R U C T  ***           10:53:50 
                      - BATCH HELP TEXT UNLOAD UTILITY -                       
                                                                               
Source Type.....: ___ ('.'=Terminate)                                          
       Major....: ________________________________                             
       Minor....: ________________________________                             
       Language.: __                                                           
Target Type.....: _                                                            
       Major....: ________________________________

Note:
When a description refers to "your print file", it refers to either print file 1 (mainframe) or device LPT1 (Unix).

CSHHCOPY Hardcopy Utility

The CSHHCOPY utility prints a hardcopy of the help text members, regardless of which teleprocessing monitor you are using. All output is routed to your print file.

The following example shows the CSHHCOPY utility window:

               ***** N A T U R A L   C O N S T R U C T *****                    
                      - BATCH HELP HARDCOPY UTILITY -                           
                                                                                
  TYPE:   MAJOR:                                  MINOR:                        
                                                                                
 LANGUAGE:

CSHHCOPY accepts up to 25 help member input combinations in the form:

Type,Major,Minor,Language

As you enter each combination, it is automatically displayed in the window.

The following table shows examples of input values:

Values Entered Results
Type: * Routes all help members to your print file.
Type: P Routes all help members with a Type component of "P".
Type: P*

Major: GL-SYSTEM

Routes all help members with a Type component beginning with "P" and a Major component of "GL-SYSTEM".
Type: P

Major: GL*

Routes all help members with a Type component of "P" and a Major component beginning with "GL".
Type: P

Major: GL*

Minor: ONLINE*

Routes all help members with a Type component of "P", a Major component beginning with "GL", and a Minor component beginning with "ONLINE".
Type: P

Major: GL*

Minor: ONLINE*

Language: 1

Routes all help members with a Type component of "P", a Major component beginning with "GL", a Minor component beginning with "ONLINE", and a Language component of "1".

Tip:
You can also enter "P,GL*,ONLINE*,1" on the command line.

Type: . (period) Terminates the CSHHCOPY utility.

CSHUNLD Unload Utility

The CSHUNLD utility unloads selected help members from the help text file to work file 1. A report of the unloaded help members is routed to your print file.

The following example shows the CSHUNLD utility window:

13-10-21           *** N A T U R A L  C O N S T R U C T ***           10:56:33
                      - BATCH HELP TEXT UNLOAD UTILITY -                      
                                                                              
Source Type.....: ___ ('.'=Terminate)                                         
       Major....: ________________________________                            
       Minor....: ________________________________                            
       Language.: __                                                          
Target Type.....: _                                                           
       Major....: ________________________________

CSHUNLD unloads an unlimited number of help text members in up to 25 input combinations in the form:

Source Type,Major,Minor,Language,Target Type,Major

As you enter each input combination, it is automatically displayed in the window.

The following table shows examples of input values:

Values Entered Results
Source Type: * Unloads all help members from the help text file to work file 1 (using the same names).
Source Type: P

Major: GL-SYSTEM

Unloads all help members with a Type component of "P" and a Major component of "GL-SYSTEM" (using the same names).
Source Type: P

Major: GL-SYSTEM

Minor: ONLINE*

Unloads all help members with a Type component of "P", a Major component of "GL-SYSTEM", and a Minor component beginning with "ONLINE" (using the same names).
Source Type: P

Major: GL-SYSTEM

Minor: ONLINE*

Language: 1

Unloads all help members with a Type component of "P", a Major component of "GL-SYSTEM", a Minor component beginning with "ONLINE", and a Language component of "1" (using the same names).
Source Type: P

Major: GL-SYSTEM

Target Type: F

Major: GL

Selects all help members with a Type component of "P" and a Major component of "GL-SYSTEM", renames the members as Type component "F" and Major component "GL", and unloads the renamed members.

Tip:
You can also enter "P,GL-SYSTEM, , ,F,GL" on the command line.

Source Type: . (period) Terminates the CSHUNLD utility.

CSHLOAD Load Utility

The CSHLOAD utility loads selected help members from work file 1 to the help text file. A report of the loaded members is written to your print file.

CSHLOAD accepts up to 25 help member input combinations and replace options in the form:

Type,Major,Minor,Language,Replace (Y/N)

The following table shows examples of input values:

Values Entered Results
*,*,*,*,N Loads all help members from work file 1 to the help text file. If a member with the same name exists in the help text file, it is not replaced.

This example indicates the following specifications:

  • Type: *

  • Major: *

  • Minor: *

  • Language: *

  • Replace: N

Note:
For the Major, Minor, Language, and Replace options above, blank or null values also indicate the specifications (for example, "*, , , , ").

P,GL*,*,*,Y Loads all help members with a Type component of P and Major component beginning with GL. If a member with the same name exists in the help text file, it is replaced with the one in work file 1.

This example indicates the following specifications:

  • Type: P

  • Major: GL*

  • Minor: *

  • Language: *

  • Replace: Y

Note:
For the Minor and Language options above, blank or null values also indicate the specifications (for example, "P,GL*, , ,Y").

P,GL*,GLA*,*,Y Loads all help members with a Type component of P, a Major component beginning with GL, and a Minor component beginning with GLA. If a member with the same name exists in the help text file, it is replaced with the one in work file 1.

This example indicates the following specifications:

  • Type: P

  • Major: GL*

  • Minor: GLA*

  • Language: *

  • Replace: Y

Note:
For the Language option above, blank or null values also indicate the specifications (for example, "P,GL*,GLA*, ,Y").

P,GL*,GLA*,1,N Loads all help members with a Type component of P, Major component beginning with GL, Minor component beginning with GLA, and Language component of 1. If a member with the same name exists in the help text file, it is not replaced.

This example indicates the following specifications:

  • Type: P

  • Major: GL*

  • Minor: GLA*

  • Language: 1

  • Replace: N

Note:
For the Replace option above, blank or null values also indicate the specifications (for example, "P,GL*,GLA*,1, ").

P,GL-SYSTEM,*,*,N Loads all help members with a Type component of P and Major component of GL-SYSTEM. If a member with the same name exists in the help text file, it is not replaced.

This example indicates the following specifications:

  • Type: P

  • Major: GL-SYSTEM

  • Minor: *

  • Language: *

  • Replace: N

Note:
For the Minor, Language, and Replace options above, blank or null values also indicate the specifications (for example, "*,GL-SYSTEM, , , ").

. (period) Terminates the CSHLOAD utility.

Note:
When running in batch mode, the CSHLOAD utility will terminate with RC=0 if an error occurs due to problems with the internal layout structure of work file 1. To terminate the batch Natural session with RC=99, add "Y" to the end of the last help member input combination (for example: "P,GL-SYSTEM,*,*,N,Y").

CSHUSAVE Utility

The CSHUSAVE utility loads help text members from a user-defined work file to the help text file. You can use this utility to transfer help text from a pre-existing source, such as a PC text file, to the help text file.

The following example shows the CSHUSAVE utility window:

  CSHUSAVE                ***** Natural Construct *****             CSHUSAV0 
  Oct 18                      Multiple Help Text Import               1 of 1 
                                                                             
                                                                             
   Replace existing entry.......: _ (Y/N)                                    
                                                                             
   Default Parameters                                                        
             Profile............: ________ *                                 
 Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1 
       help  retrn

After pressing Enter in this window, a help window is displayed to select the location of the work file. For a description of this file, see Work File 1 Layout.

The following table shows examples of input values:

Values Entered Results
(none) Loads all help text members in the selected work file to the help text file. Help members with the same names in the help text file are not replaced. Any help member in work file 1 that does not specify a help profile name, or specifies an invalid help profile name, is saved with the name SYSTEM (the default profile when none is specified).
Replace existing entry: Y Loads all help text members in the selected work file to the help text file. Help members with the same names in the help text file are replaced with those in the work file.
Profile: MYPROF Loads all help text members in the selected work file to the help text file. Any help member in work file 1 that does not specify a help profile name, or specifies an invalid help profile name, is saved with the name MYPROF.
. (period) Terminates the CSHUSAVE utility.

Work File 1 Layout

There is no limit to the number of help text members contained in work file 1, but the length of each help text line should not exceed 68 characters. Any text beyond 68 characters will be truncated.

Each help member consists of keywords and directives, followed by the lines of help text. The following conventions apply to all keywords and directives:

  • Must begin with a slash (/) character

  • Must begin in the first column (column 1)

  • Can be entered in upper case, lower case, or mixed case

Each help member in work file 1 must begin with "/key=" and contain the name of the help member in the following format:

/key=type component/major component/minor component/language code

Note:
If you do not specify a language code, the default language is assumed.

In addition, the following optional keywords are also supported:

Keyword Directive
/profile= Name of the help profile to use when saving this help member. If you do not specify this keyword, the help member is saved using the help profile name specified for the profile parameter.

Note:
If you do not specify the profile parameter, the default help profile name is used (SYSTEM).

/header1= First heading displayed when this help member is invoked.
/header2= Second heading displayed when this help member is invoked.
/linktext= Text displayed when this help member is referenced via a hotlink from another help member.
/intensify= Character that identifies the beginning of intensified text. This parameter defaults to the value specified on the Natural Construct Control record.
/default= Character that identifies the end of intensified text. This parameter defaults to the value specified on the Natural Construct Control record.
/pagebreak Displays the line of text that follows this keyword on a new page.

Example of Work File 1 Layout

/key=P/GENERAL-LEDGER/GLMJ/1
/header1=General Ledger System
/header2=Journal Entry Help
/linktext=Journal Entry
This is a sample help member for the journal entry screen.
More sample help
/pagebreak
This line of help is forced onto a new page 
/key=P/GENERAL-LEDGER/GLMA/1
/header1=General Ledger System
/header2=Account Maintenance Help
/linktext=Account Maintenance
/profile=SPECIAL
/intensify=<
/default=>
This is a sample help member for the account maintenance screen.
More sample help
etc.

Example of Batch Input

The following JCL invokes the CSHUSAVE utility in batch:

SYSIN DD *
LOGON SYSCST
CSHUSAVE
Y,MYPROF
/*

This example indicates that existing help members are replaced by any help members with the same name in work file 1 and that MYPROF is used as the default help profile name.

CSHUSAVN Utility

The CSHUSAVN utility saves the current contents of the source buffer to the Natural Construct help text file programmatically — without creating a work file. This utility uses the CSAUSAVN and CSASTD parameter data areas (PDAs).

The following example shows a program (CTESAVN) using the CSHUSAVN utility to save help text to the Natural Construct help text file:

*********************************************************************
* Program  : CTESAVN
* System   : Natural-Construct
* Title    : Call help save subprogram
* Function : This is an example of how CSHUSAVN can be called.
*********************************************************************
DEFINE DATA
  LOCAL USING CSAUSAVN
  LOCAL USING CSASTD
END-DEFINE
DEFINE PRINTER(HELP=1) OUTPUT 'SOURCE'
FORMAT(HELP) LS=68 PS=0
PRINT(HELP) NOTITLE
      'This is sample help text that is written to the source area'
      'It normally comes from a database file or other external'
      'source, or generated based on a high-level specification'
ASSIGN CSAUSAVN.#TYPE-COMPONENT = 'P' /* Program
ASSIGN CSAUSAVN.#MAJOR-COMPONENT = 'TEST-MAJOR'
ASSIGN CSAUSAVN.#MINOR-COMPONENT = 'TEST-MINOR'
ASSIGN CSAUSAVN.#LANGUAGE-CODE = *LANGUAGE
ASSIGN CSAUSAVN.#PROFILE-NAME = 'SYSTEM'
ASSIGN CSAUSAVN.#HEADER1 = 'Sample header 1'
ASSIGN CSAUSAVN.#HEADER2 = 'Sample header 2'
ASSIGN CSAUSAVN.#LINK-TEXT = 'Sample Link'
ASSIGN CSAUSAVN.#INTENSIFY = '<'
ASSIGN CSAUSAVN.#DEFAULT = '>'
ASSIGN CSAUSAVN.#REPLACE-OPTION = TRUE
CALLNAT 'CSHUSAVN' CSAUSAVN CSASTD
IF CSASTD.RETURN-CODE = ' ' THEN
  WRITE 'Help saved successfully'
END-IF
END

Move Data Across Platforms

This section describes how to transfer data across dissimilar platforms (between mainframe and Unix, for example). The following load and unload utilities read and write data from and to work file 1:

Utility Described in
CSFLOAD Multiple Code Frame Import Utility in Natural Construct Administration and Modeling
CSFUNLD Multiple Code Frame Export Utility in Natural Construct Administration and Modeling
CSHLOAD CSHLOAD Help Text Load Utility
CSHUNLD CSHUNLD Help Text Unload Utility
CSHUSAVE CSHUSAVE Utility
CSHUSAVN CSHUSAVN Utility
CSMLOAD

CSMUNLD

Natural Construct Generation

A work file written on one platform (such as mainframe) can be read by another platform (such as Unix) if the following conditions are met:

  • The work file is an ASCII file.

    Start of instruction setTo save the work file as an ASCII file on a mainframe platform

    1. Define work file 1 as a PC file.

    2. Activate a PC connection.

    3. Run the utility (translates from EBCDIC to ASCII).

    Start of instruction setTo save the work file as an ASCII file on a Unix platform

    1. Set the work file specification in your NATPARM to any extension other than SAG.

  • When you transfer the work file between platforms, the appropriate translation must be done. For example, the file transfer method used to move a file from a PC to a Unix machine must correctly translate the PC's CR/LFs to CRs.