— Natural Construct Administration and Modeling —
External Objects
This section describes the supplied programs, subprograms, and
helproutines that help simplify and standardize the model creation process.
These utilities can be invoked by the supplied models or by user-written
models.
Note:
The source code for external objects is not supplied.
This section covers the following
topics:
Introduction
All model subprograms use external parameter data areas (PDAs) stored in
the SYSCST library. The source for the PDAs is provided and contains details
about each parameter. For example, some of the listings for the CPAEL PDA
are:
Parameter CPAEL Library SAG DBID 18 FNR 4
Command > +
I T L Name F Leng Index/Init/EM/Name/Comment
Top - -------------------------------- - ---- ---------------------------------
1 CPAEL
2 INPUTS
3 FILE-NAME A 32 /* File Name.
3 FIELD-NAME A 32 /* Field name to be found in the
3 #SIMPLE-OUTPUTS-ONLY L /* True if interested in
* /* #FIELD-FOUND only
* /* given file
2 INPUT-OUTPUTS
3 FILE-CODE P 8 /* If this code is known,
* /* NSC checks are avoided.
3 DDM-PREFIX A 16 /* Field prefix on DDM,
* /* this will be set if correct
* /* FILE-CODE is not provided.
2 SIMPLE-OUTPUTS
3 #FIELD-FOUND L /* True if field found on file
3 FIELD-IS-REDEFINED L /* The field is redefined.
----------------------------------------------------------------- S 70 L 1 |
CPAEL contains a level 1 structure called CPAEL. Depending on the type
of parameter, the remaining parameters are grouped into the following
structures: INPUTS, INPUT-OUTPUTS, and OUTPUTS. This layout is the same for all
PDAs used by the supplied subprograms.
Note:
Be careful when modifying fields in the INPUT-OUTPUTS structure;
these fields may retain information across multiple calls.
You can define the PDAs as local data areas (LDAs) within the model
subprograms that invoke the utilities. CPAEL is the PDA corresponding to the
CPUEL subprogram utility, which returns information about a field in
Predict.
The following example shows a model subprogram that requires field
information from Predict:
DEFINE DATA PARAMETER
PARAMETER
.
.
.
LOCAL USING CPAEL
LOCAL USING CSASTD
.
.
.
END-DEFINE
.
.
.
ASSIGN CPAEL.FILE-NAME = #PDAX-FILE-NAME
ASSIGN CPAEL.FIELD-NAME = #PDAX-FIELD-NAME
CALLNAT 'CPUEL' CPAEL CSASTD
*
*Check outputs of CPUEL
.
.
.
END
This section provides a brief description of the supplied program,
subprogram, and helproutine utilities. For examples of how to invoke the
utilities, refer to the source code for the supplied model subprograms in the
SYSCST library (prefixed by CU).
Note:
Driver programs for many of the supplied model programs and
subprograms are included on the Natural Construct tape (prefixed by CTE). These
driver programs are also available through the Drivers menu option on the
Administration main menu. If a driver program is available, its location is
listed in the Drivers Menu Option section for the program or
subprogram. For information about invoking the driver programs, see
Drivers Menu
Function.
This section covers the following
topics:
Object Categories
The supplied objects are divided into three categories, based on the
type of information they access. Each category is identified by its prefix as
follows:
Prefix |
Object Categories |
CN* |
Identifies objects that return or generate data
based on information in the Natural system files.
|
CP* |
Identifies objects that return or generate data
based on information in Predict.
|
CS* |
Identifies objects that are miscellaneous
validation, calculation, or translation routines. Most of these routines do not
access system file information, but some access Natural Construct system files.
|
Whenever possible, use the supplied programs, subprograms, and
helproutines instead of accessing the system file information directly. This
helps protect your programs from unwanted changes to the internal structure.
Natural Construct maintains the upward compatibility of the supplied programs,
subprograms, and helproutines.
Error Processing
Many of the supplied subprograms return information through the CSASTD
parameter data area (PDA). The value in the RETURN-CODE field should be checked
after each call. If it is not blank, it should be passed back to the generation
nucleus so the user is aware of the problem.
The following example shows a model subprogram that invokes the CPUEL
utility:
DEFINE DATA
PARAMETER USING CUMYPDA
PARAMETER USING CU--PDA
PARAMETER USING CSASTD
LOCAL USING CPAEL
.
.
.
END-DEFINE
.
.
.
CALLNAT 'CPUEL' CPAEL CSASTD
IF CSASTD.RETURN-CODE NE ' ' THEN
ESCAPE ROUTINE IMMEDIATE
END-IF
Passing of Structure Names
To invoke the supplied subprograms, pass only the level 1 structures in
the PDA. This way, if new parameters are added to the utilities in future
versions of Natural Construct, you need only recatalog your model subprograms
to incorporate the changes.
Restricted Data Areas
Some subprograms have restricted data areas to retain information
across multiple calls. The restricted data areas are identified by an R in the
third position of the data area name (CPRELNX, for example).
You do not need to be concerned with the contents of these data areas.
Define them as local data areas within the invoking subprograms and pass them
to the subprogram that is invoked.
Tip:
As with all PDAs, the name of the structure passed to the subprogram
always matches the name of the data area itself.
Callback Functions
Many of the Natural Construct utility subprograms iterate through
system data and, for each record found, call a user-supplied routine. For
example, CPURLRD is used to retrieve all relationships related to a particular
file. Rather than returning these relationships to the caller of CPURLRD, the
caller must supply the name of a subprogram CPURLRD should call for each
relationship found.
These routines accept an A1 array to allow the caller of the utility to
communicate information to and from the subprogram called by the utility. This
data area is represented by CSAPASS. It is accepted by the utility as a 1:v
array so that the actual size of the data area can be determined by the
requirements of the caller.
Subprogram Chaining
When a subprogram performs read logical processing and returns a series
of records, it is sometimes difficult or inefficient for the subprogram to
remember where it left off in a previous call. Also, this type of
processing can be awkward to code in the invoking object because it must define
looping logic and issue iterative CALLNATs until a certain end condition is
reached.
To avoid these problems, some subprograms do not return the information
to the calling object. Instead, the calling object passes the name of a
subprogram that is invoked for each record encountered. To generate an INPUT
statement containing all fields in a file, for example, you can use the CPUELNX
and CPUELRD subprograms. This section describes these
subprograms.
Without Subprogram Chaining (CPUELNX)
The CPUELNX subprogram can be called iteratively to continually return
the next field in the file until an end-of-file condition is reached. The model
subprogram that generates the INPUT statement must define the looping logic and
make iterative CALLNATs to include each field in the INPUT statement.
With Subprogram Chaining (CPUELRD)
The CPUELRD subprogram can be invoked once by the model subprogram
(CUXXGIN1, for example). This subprogram receives the name of a file and a
subprogram to CALLNAT (CUXXGIN2, for example). It traverses the file and
CALLNATs the subprogram for each field. That subprogram adds the current field
to the INPUT statement generated. For example:
To allow CPUELRD to remember information across iterative calls, a 1K
area is passed to CUXXGIN2. This area can be redefined into individual fields,
such as current status information, that are required by CUXXGIN2 across
multiple calls. It can also pass additional information between CUXXGIN1 and
CUXXGIN2.
Note:
For an example of how subprogram chaining is used, refer to the
CUFMGIN1 and CUFMGIN2 programs in the SYSCST library.
Natural-Related Subprograms (CNU*)
The subprograms described in this section retrieve information from the
Natural system files to assist in the generation
process. For subprograms that return information about Natural objects
(programs, data areas, etc.), the specified data area object must exist in the
current library or one of its steplibs.
Tip:
Driver programs for many of the supplied model programs and
subprograms are included on the Natural Construct tape (prefixed by CTE). These
driver programs are also available through the Drivers menu option on the
Administration main menu. If a driver program is available, its location is
listed in the Drivers Menu Option section for the program or
subprogram. For information about invoking the driver programs, see
Drivers Menu
Function.
This section describes the following
subprograms:
CNUEL Subprogram
CNUEL |
Description |
What it does |
Retrieves information about a field in a local
data area (LDA) or parameter data area (PDA). This subprogram receives the name
of a field and data area (CNAEL.INPUTS) and returns information about the field
(CNAEL.OUTPUTS), such as the structure to which the field belongs, the field
format and type, the level number, and the starting and ending index for
arrays.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEELN ***** Natural Related Subprograms ***** CTEELN1
Feb 25 - Driver for subprogram CNUEL - 03:30 PM
*Data Area Name : ________
Field Name.....: ________________________________
Structure Name : ________________________________
View Of Name...:
Field Found....: Field Format: Lvl Number....:
Constant Field : Field Length:
Field Redefined: Rank........:
Lvl Type Trail :
From Index Thru Index 1:V Field Occurrences
---------- ---------- --- -----------------
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CNUELNX Subprogram
CNUELNX |
Description |
What it does |
Returns information about the next field in a
data area. This subprogram receives the name of an external data area and
returns information about the next field in that data area. On the first call
to this subprogram, the specified field is returned. On subsequent calls, the
next fields are returned.
CNRELNX (PDA containing reserved variables) keeps track of the
current position of the data area and must not be modified by the calling
program.
Note: For information about INPUT/OUTPUT parameters, refer to the
CNAELNX data area in the SYSCST library.
|
PDAs used |
|
Files accessed |
|
CNUELNX On Unix Platforms
On Unix platforms, it is necessary to explicitly close any open
cursors. CNUELNX does this automatically whenever a data area is read in its
entirety. However, if you want the calling program to only read a portion of
the data area, you must insert additional code to close the open cursor. For
example:
/* close the object
IF CNRELNX.NATA1500-END-OF-FILE
IGNORE
ELSE
CNAELNX.#CLOSE-OBJECT := TRUE
CALLNAT 'CNUELNX' CNAELNX CNRELNX CSASTD
END-IF
Drivers Menu Option
CTENLNX ***** Natural Related subprograms ***** CTENLNX1
Feb 25 - Driver for subprogram CNUELNX - 03:15 PM
*Data Area Name...: ________ Field Count: Constant Field :
First Time.......: X End Of File: Dynamic Field..:
Structure Name...: Field Redefined:
Field Name.......: Field Format...:
Field Length.....: Units: Decimals.......:
View Of Name.....:
Level Number.....: Basic Occurrences: _ Rank...........:
Level Type Trail.:
Occurrences Found:
Starting At: 1_
From Index Thru index 1:V Field Occur
Object location ------------ ------------ --- -----------
Library: ________
DBID...: _____
FNR....: _____
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
Tip:
As this subprogram can have up to 99 field levels, enter a level
number in the Starting At field to display the specified level (as well as the
next nine levels).
CNUERMSG Subprogram
CNUERMSG |
Description |
What it does |
Receives a Natural
error message number and returns the error message text. This subprogram
receives a Natural error message number (CSASTD.MSG-NR) and returns the
corresponding error message text (CSASTD.MSG). For example, the message text
for Natural message number 0888 is Storage Overflow During
Compilation or Execution .
|
PDAs used |
|
Files accessed |
|
Note:
This subprogram returns system error messages, rather than
application error messages. For information about application error messages,
see CNUMSG
Utility.
Drivers Menu Option
CTEERMSG N a t u r a l C o n s t r u c t CTERMSG1
Aug 14 Driver for subprogram CNUERMSG 1 of 1
Msg Nr...: ____ Error Fld:
Ret Code :
Msg:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CNUEXIST Subprogram
CNUEXIST |
Description |
What it does |
Checks for the existence of a
Natural module. This subprogram receives the name of
a Natural module and determines whether its source, compiled object, or both
exist. If the source and/or compiled object exist, the subprogram returns the
module type (P for program) and library name(s) in which the source and/or
compiled object(s) were found.
If the module is not found in the current library, you can request
a search of all steplibs. In this case, the name of the first library in which
the module was found is returned.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEEXIST ***** Natural Related Subprograms ***** CTEXIST
Feb 09 - Driver for subprogram CNUEXIST - 05:31 PM
*Object/Source Name......: ________ Source Object
Object/Source or Both...: _ -------- --------
Search type... Exists.:
Library + Steplib Search: _ Type...:
or Library:
Specific library search DBID...:
Library Name........: ________ FNR....:
DBID................: _____ User...:
FNR.................: _____ Date...:
(Blank implies current library) Time...:
|
CNUGDABL Subprogram
CNUGDABL |
Description |
What it does |
Builds a full path name for a global data area
(GDA) block. This subprogram receives a GDA name and the name of a GDA block.
It returns the full path name from the master block to the specified block. For
example, if BLOCK11 is a sub-block of BLOCK1, which is a sub-block of
MASTER-BLOCK, the following full path name is returned:
MASTER-BLOCK.BLOCK1.BLOCK11 |
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEGDABL N a t u r a l C o n s t r u c t CTEGDAB1
Aug 14 Driver for subprogram CNUGDABL 1 of 1
*GDA Name......: ________
Block Name....: ________________________________
Full Path Name:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CNUGDAEL Subprogram
CNUGDAEL |
Description |
What it does |
Verifies that a field is contained in a global
data area (GDA). This subprogram receives the name of a GDA and the name of a
field. If the field exists in the GDA, this subprogram returns a confirmation
flag.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEGDAEL N a t u r a l C o n s t r u c t CTEGDAE1
Aug 14 Driver for subprogram CNUGDAEL 1 of 1
*GDA Name...: ________
Field Name : ________________________________
Field Found:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CNUGENDA Subprogram
CNUGENDA |
Description |
What it does |
Adds a field to a data area. This subprogram
receives the definition of a field (field type, level number, field name, field
format and length, and the number of occurrences, for example) to be added to a
data area and generates the field definition at the end of the current edit
buffer.
For information about INPUT/OUTPUT parameters, refer to the
CNAGENDA data area in the SYSCST library.
Note: Before this subprogram is invoked, the calling program must set
the Natural editor to a data area type of A, L, or G.
|
PDAs used |
|
Files accessed |
|
To use this utility internally, issue a CALLNAT to the following
subprogram immediately after calling CNUGENDA:
CALLNAT 'CNUGENDU'
There are no parameters for this subprogram.
Drivers Menu Option
CTEGENDA ***** Natural Related Subprograms ***** CTEGEND1
Feb 25 - Driver for subprogram CNUGENDA - 03:19 PM
Field Name: ________________________________
Field Type: _ Format: _ FIELD-LENGTH-A FIELD-LENGTH-A 00000000000
Level.....: _ Length: ____________ Occurrences: _______________
Comment....: ________________________________
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CNUMPPRF Subprogram
CNUMPPRF |
Description |
What it does |
Reads a map profile from a
Natural system file. This subprogram receives the
name of the map profile in the CSAMPSET.#PROFILE field. It reads the profile
from the Natural system file (FNAT) and returns the map settings.
For information about the OUTPUT parameters, refer to the CSAMPSET
data area in the SYSCST library.
|
PDAs used |
|
Files accessed |
|
Note:
This routine is not available on all
platforms.
Drivers Menu Option
CTEMPPRF N a t u r a l C o n s t r u c t CTEMPRF1
Aug 14 Driver for subprogram CNUMPPRF 1 of 1
Map Profile....: ________ Layout......: Map Type.....:
Map Version....: Map Name....: Std Keys....:
+--------------------------------------------+
1__ | Delimiter Class AD CD Delimiter Char |
DC: | --------------- -- -- -------------- | Col Shift....:
PS: | | Case Deflt...:
LS: | | Cursor Skip..:
ZP: | | PM...........:
+--------------------------------------------+
Write Statement: CV..........: Justification:
Input Statement: Error Code..: Enforce Attr :
Auto Rule Rank : Hlp Fld Dflt:
Fill Character : Help........:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit bkwrd frwrd mai |
CNUMSG Subprogram
CNUMSG |
Description |
What it does |
Returns application message text from the SYSERR
message file.
Note: For more information, see CNUMSG
Utility.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEMSG ***** Natural Related subprograms ***** CTEMSG1
Oct 16 - Driver for subprogram CNUMSG - 08:53 AM
Message Number.: 0008 *Message Library: CSTMSG__
Message Text (Input)
______________________________________________________________________
Retrieval Method: R ('R' for Retrieve, 'S' for Substitute, 'B' for Both)
Message Substitution
Data(1): ________________________________ *Message Library: CSTLDA__
Data(2): ________________________________ *Message Library: CSTLDA__
Data(3): ________________________________ *Message Library: CSTLDA__
Default Languages
*LANGUAGE: 1 1) 1_ 2) 1_ 3) 1_ 4) 1_ 5) 1_ 6) 1_ 7) 1_ 8) 1_
Response Code: 0 ( 9 - unsuccessful )
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CNUNPDA Subprogram
CNUNPDA |
Description |
What it does |
Determines what the parameters are in a given
subprogram and then passes the parameters to another subprogram to
process.
|
Parameters/PDAs used |
-
CNANPDA
-
CU__PDA
-
#PASS (*)
-
CSASTD
If you are not using method 0, these are the only parameters used.
If you are using method 0 and creating your own subprogram to process
individual fields, your new subprogram requires the following parameter data
areas:
PARAMETER USING CNANPDA
PARAMETER USING CNANPDA2
PARAMETER 01 DATA-PTR(A1/1:V) (can be replaced with #PASS from above)
PARAMETER USING CU__PDA (can be a model PDA)
PARAMETER USING CSASTD |
|
Drivers Menu Option
CTENPDA ***** Natural Related Subprograms ***** CTENPDA1
Aug 15 - Driver for subprogram CNUNPDA - 11:35 AM
Inputs
subprogram name ....... ________ * callnat ............... CTENPDA2
method ................ ___ * Include step Library .. _
Detail ext. data Areas 2__ * level 1 fields only ... _
Include Redefine Base . ___ * Include Redefines ..... 2__
Basic occurrences ..... _ Only process 1:V fields _
Specific 1:V override . ____ ____ ____ ____ ____ ____ ____ ____ ____ ____
____ ____ ____ ____ ____ ____ ____ ____ ____ ____
____ ____ ____ ____ ____ ____ ____ ____ ____ ____
default 1:V ........... _____
Skip data areas ....... ________ ________ ________ ________ ________
________ ________ ________ ________ ________
________ ________ ________ ________ ________
________ ________ ________ ________ ________
________ ________ ________ ________ ________
Outputs
Library ............... ________
number of parms ....... _____ 1:V parms found ....... _
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
help retrn quit main
|
Note:
In addition to these fields, CNUNPDA also has access to the
PDA-NAME input parameter in CNANPDA. When PDA-NAME contains the name of an
external data area, the parameters in PDA-NAME are processed and the parameters
in SUBPROGRAM-NAME are ignored.
When using the CTENPDA driver program to call CNUNPDA, the program:
-
Receives the name of a Natural subprogram in the Subprogram name
field.
-
Reads the parameters for the subprogram.
-
Determines which fields are available in the PDA (either internally
or externally defined).
-
Passes each field to the processing subprogram specified in the
Callnat field. When method 0 is used, each PDA in the subprogram is processed
by the subprogram specified in the Callnat field.
Note:
When the method is 0 for CTENPDA, whatever is in the Callnat
field is executed. By default this is the CTENPDA2 subprogram. Regardless of
which subprogram is specified in the Callnat field, the subprogram is executed
once for each of the parameters found in that subprogram. CTENPDA2 uses a map
to display the attributes for each parameter in the specified subprogram.
CTENPDA returns the name of the library containing the Natural
subprogram, the number of fields in the PDA, and the number of 1:V fields. The
map for CTENPDA uses the variables in CNANPDA (which include the input of the
subprogram name and the output of the number of parameters processed). The
available methods are:
-
0 - Normal call
-
1 - Check Existence of 1:V Array
-
2 - Generate As Local
-
3 - Generate As Arguments
-
4 - Generate As Input Fields
-
5 - Generate As Helproutine Parms
-
6 - Generate As Parameter
-
7 - Generate As External Parameter
-
8 - Generate As Parameter String
-
9 - Generate As Non Specified
-
10 - Generate As Restricted Input
-
11 - Generate As Unicode Parameter String
For common processes, such as generating an LDA based on the PDAs of a
specified subprogram, a non-0 method can be used. This means the value in the
Callnat field is ignored and a Construct internal subprogram is called instead
of CTENPDA2.
The generated PDA information can be useful when generating:
-
A CALLNAT statement for the specified subprogram, since a CALLNAT
statement requires all level 1 fields in the PDA to be passed to the subprogram
(method 3).
-
An INPUT statement to test the specified subprogram. In this case,
all the fields required for the subprogram can be easily defined in the INPUT
statement (method 4).
-
Fields for a DEFINE DATA statement. This is helpful when creating a
module that will issue a CALLNAT to the subprogram that is being processed
(method 2 or method 6).
How the CST internal subprogram uses the extracted PDA information is
determined by the specified method and other input values (such as, only
process 1:V fields).
Using the internal subprogram is similar to using method 0 with a
CALLNAT to CTNEPDA2, except the method is different and the name of the
subprogram called to process each PDA field is not required. The key difference
is that information is written to the editor, instead of displayed on the
screen (as with CTENPDA2). When not using method 0, therefore, you must quit
out of CTENPDA to see the processing results.
Once you know what you want to generate, you can use parameters shown
on the CTENPDA screen by placing them in the PDA for CNUNPDA (CNANPDA) and
invoking the following CALLNAT statement:
CNANPDA.METHOD := CNLNPDA.GENERATE-AS-LOCAL
CNANPDA.INCLUDE-STEPLIB-SEARCH := TRUE
CNANPDA.INCLUDE-REDEFINE-BASE := CNLNPDA.INCLUDE-BASE-AND-REDEF-LEVEL
CNANPDA.INCLUDE-REDEFINES := CNLNPDA.INCLUDE-ALL-REDEFINES
CALLNAT 'CNUNPDA' CNANPDA
CUDRPDA (or CU__PDA, or any other model PDA)
#PASS(*)
CSASTD
|
Example of Using CTENPDA
This section provides an example of using the Driver for subprogram
CNUNPDA program, CTENPDA. CTENPDA is useful when determining the effect of the
input parameters on the output parameters. For example, you can enter
"CALC" in Subprogram name,
"CTENPDA2" in Callnat,
"2" in Detail ext. data Areas, and
"2" in Include redefines to determine the output in
the CNANPDA2 PDA (which is placed on a map in CTENPDA2). These details help
identify valuable attributes about fields in the data area, such as:
For this example, the supplied CALC subprogram (available in the
SYSCSTDE library) is used. The PDA for CALC is:
DEFINE DATA PARAMETER
1 INPUT-DATA
2 #FUNCTION (A30)
2 #FIRST-NUM (N5.2)
2 #SECOND-NUM (N5.2)
2 #SUCCESS-CRITERIA (N5)
1 OUTPUT-DATA
2 #RESULT (N11.2)
2 #TIME (T)
2 #SUCCESS (L)
END-DEFINE
In the following example, CALC is used as input to the subprogram
name field:
CTENPDA ***** Natural Related Subprograms ** CTENPDA1
Sep 12 - Driver for subprogram CNUNPDA - 05:14 PM
Inputs
subprogram name ....... CALC____ * callnat ............... CTENPDA2
method ................ ___ * Include step Library .. _
Detail ext. data Areas 2__ * level 1 fields only ... _
Include Redefine Base . ___ * Include Redefines ..... 2__
Basic occurrences ..... _ Only process 1:V fields _
Specific 1:V override . ____ ____ ____ ____ ____ ____ ____ ____ ____ ____
____ ____ ____ ____ ____ ____ ____ ____ ____ ____
____ ____ ____ ____ ____ ____ ____ ____ ____ ____
default 1:V ........... _____
Skip data areas ....... ________ ________ ________ ________ ________
________ ________ ________ ________ ________
________ ________ ________ ________ ________
________ ________ ________ ________ ________
________ ________ ________ ________ ________
Outputs
Library ............... ________
number of parms ....... _____ 1:V parms found ....... _
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
help retrn quit main |
Press Enter to display details about the first level 1 field in the
data area for CALC:
Return to caller ........
Current line number ..... 2 Current Attribute number 1
External data area ......
Structure name ..........
Field name .............. INPUT-DATA
Redef start ............. Field redefined .........
Level number ............ 1 Field format ............
Rank .................... Field length ............
Found-1-V ............... Dynamic .................
From index ..............
Thru index ..............
Field occurrences .......
Start Occurences at ..... 1
Occurrences.......
Level type trail . S
From (1)
From (2)
From (3)
To (1)
To (2) |
This screen displays details about the INPUT-DATA field and is for
display only (i.e., you cannot change the values on the screen). Press Enter
again to display the first level 2 field in INPUT-DATA:
Return to caller ........
Current line number ..... 3 Current Attribute number 2
External data area ......
Structure name .......... INPUT-DATA
Field name .............. #FUNCTION
Redef start ............. Field redefined .........
Level number ............ 2 Field format ............ A
Rank .................... Field length ............ 30.0
Found-1-V ............... Dynamic .................
From index ..............
Thru index ..............
Field occurrences .......
Start Occurences at ..... 1
Occurrences.......
Level type trail . S F
From (1)
From (2)
From (3)
To (1)
To (2) |
This screen displays details about the #FUNCTION field. Continue
pressing Enter to display every level 1 and under field in the data area. After
the last field is displayed, the input screen is redisplayed.
Notes:
- To return to the input screen at any time, select
Return to caller and press Enter.
- To display additional occurrences, specify the occurrence number
in the Start occurrences at field. Up to 99 occurrences
are displayed.
The parameters for CTENPDA2 are:
PARAMETER USING CNANPDA
PARAMETER USING CNANPDA2
PARAMETER 01 DATA-PTR(A1/1:V)
PARAMETER USING CU__PDA
PARAMETER USING CSASTD |
The important inputs when using method 0 are in CNUNPDA. These are:
-
CNANPDA.SUBPROGRAM-NAME /* the name of the subprogram from which the
parameters will be retrieved
-
CNUNPDA.CALLNAT /* the new subprogram mentioned above
-
CNUNPDA.METHOD /* should be left as 0
If the non-zero methods do not provide what you need, you can create
your own version of CTENPDA2 and do whatever you want with the available
variables (the same PDA variables used in CTENPDA2). For example, if you add
INCLUDE CU--DFPR to your program, you can use SRC (the editor) as a printer
output destination:
INCLUDE CU--DFPR
WRITE (SRC) 'Hello' /* this writes Hello to the editor
END
|
For an example of using the CNUNPDA subprogram, refer to CUDRGEN2 in
the SYSCST library.
Note:
To see how CUDRGEN2 works, run the Natural Debugger and place a
break in CUDRGEN2. Then use the Driver model to generate a program.
CNUPEXST Subprogram
CNUPEXST |
Description |
What it does |
Checks for the existence of a map profile. This
subprogram receives the name of a map profile and verifies that it exists in
the Natural FNAT system file.
|
PDAs used |
|
Files accessed |
|
Note:
This subprogram is not available on all
platforms.
Drivers Menu Option
CTEPEXST N a t u r a l C o n s t r u c t CTEPXST1
Aug 14 Driver for subprogram CNUPEXST 1 of 1
Map Profile Name..: ________
Map Profile Exists:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CNUSEL Subprogram
CNUSEL |
Description |
What it does |
Selects fields from data areas (local or
parameter). This subprogram receives the name of a local (LDA) or parameter
data area (PDA) and browses fields in the data area. To select a field, mark
it. If more than one field is marked, only the first field is selected. You can
enter "X" to terminate the display or
"T" to position the list to the top.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTESEL ***** Construct Related Subprograms ***** CTESEL1
Oct 09 - Driver for subprogram CNUSEL - 01:52 PM
*Data Area Name..: ________ Fld Name:
Field Occurrences
Structure Number: Field Format: -----------------
Type Of Field...: Field Length:
Level Number....: Units.......:
Total Fields Cnt: 0 Decimals....:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CNUSRCNX Subprogram
CNUSRCNX |
Description |
What it does |
Receives the name of the Natural object and
returns the next source line. The first call to the subprogram returns the
first source line. Subsequent calls return the next lines.
|
PDAs used |
Note: The CNRSRCNX data area (containing reserved variables) keeps
track of the current position of the object source and must not be modified by
the calling program.
|
Files accessed |
|
Drivers Menu Option
CTESRCNX N a t u r a l C o n s t r u c t CTESRCN1
Aug 14 Driver for subprogram CNUSRCNX 1 of 1
*Object Name: CTELRDSM Version:
First Time : X Include Comments: _
Src Line...: Userid: Date...: - - Type:
End Of Src : Level : Time...: . . . SM..:
Src Code...:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CNUSRCRD Subprogram
CNUSRCRD |
Description |
What it does |
Reads source text and performs specified
processing. This subprogram receives the name of a Natural object (in the
CNASRCRD.#OBJECT-NAME field) and the name of the subprogram invoked to process
each source line (in the CNASRCRD.#CALLNAT field). It passes the fields it
receives to the subprogram it invokes.
CU--PDA, which contains the model parameters, is also passed to
CNUSRCRD, as well as CSAPASS (redefined as required). It remembers
information between calls to the subprogram that processes each source line.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTESRCRD N a t u r a l C o n s t r u c t CTESRCR1
Aug 14 Driver for subprogram CNUSRCRD 1 of 1
*Object Name: ________ Finished:
CALLNAT.....: CTESRCSM Include Comments: _
Object Information
------------------
Type.......: Version: Userid: Time: . . .
SM.........: Level..: Date: - -
Src Line...:
Source Code:
:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
Note:
If you change the name of the subprogram in the CALLNAT field, the
specified subprogram must have the same parameters as those in the PDAs used by
CNUSRCRD.
Natural-Related Helproutines (CNH*)
You can attach the helproutines in this section to fields that require
the input of Natural information (such as object names, message numbers, etc.).
They are active helproutines that populate the field to which they are
attached.
CNHMDL Helproutine
CNHMDL |
Description |
What it does |
Browses all the Natural
Construct models for selection. Valid restriction parameters are:
|
Attached to |
Input of a Natural Construct model name. |
Parameters used |
|
Files accessed |
|
CNHMSG Helproutine
CNHMSG |
Description |
What it does |
Browses for and displays the application error
message text. You can add new messages to the application by pressing the Add
PF-key (the new message number is always adjusted to the next available
number).
|
Attached to |
Input of a message number field. |
Parameters used |
-
#PDA-MESSAGE(A65)
-
#PDA-MESSAGE-LIBRARY(A8)
-
#PDA-KEY(N4)
|
Files accessed |
|
CNHOBJ Helproutine
CNHOBJ |
Description |
What it does |
Browses all objects of a specified type in the
current library. This helproutine receives an object type and browses all the
objects with that type that exist in the current library. Valid object types
are:
-
P (program)
-
N (subprogram)
-
S (subroutine)
-
M (map)
-
H (helproutine)
-
C (copycode)
-
A (parameter)
-
G (global)
-
L (local)
-
T (text)
-
* (all)
-
2 (subprogram/helproutine)
-
3 (subprogram/helproutine/subroutine)
-
4 (program/subprogram/helproutine/subroutine)
-
5 (command processor)
-
D (data area)
|
Attached to |
Input of a Natural object name field. |
Parameters used |
|
Files accessed |
|
Natural Construct Generation Utility Subprograms
(CSU*)
The subprograms in this section perform specialized functions to assist
in the generation process.
Note:
Driver programs for many of the supplied programs/subprograms are
available through the Drivers menu option on the Administration main menu. If a
driver program is available, its location is listed in the Drivers
Menu Option section in the program/subprogram description. For more
information about the supplied driver programs, see
Drivers Menu
Function.
These subprograms are:
CSU-VAR Subprogram
CSU-VAR |
Description |
What it does |
Validates a specified variable name. This
subprogram receives a string and checks for a valid Natural naming convention.
Use it whenever a name used as a Natural variable is entered. If the name is
invalid, the subprogram returns a message containing the reason.
Note: The variable name can be fully qualified (contain a
prefix).
|
Parameters used |
-
#PDA-STRING(A65) /*INPUT
-
CSASTD
|
Files accessed |
|
Drivers Menu Option
CTE-VAR ***** Construct Related Subprograms ***** CTE-VAR1
Oct 09 - Driver for subprogram CSU-VAR - 02:58 PM
String: _________________________________________________________________
Msg...:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUBANN Subprogram
CSUBANN |
Description |
What it does |
Generates the standard banner into the source
buffer. Use this subprogram to generate Natural or Visual Basic
comments.
|
PDAs used |
|
Files accessed |
|
CSUBLDRP Subprogram
CSUBLDRP |
Description |
What it does |
Builds a report layout. This subprogram builds a
report layout for the Batch, Browse, and Browse-Select models. It can be
invoked from a sample subprogram within a user exit. The invoking subprogram
must issue an initial RESET statement to clear the structures in CSASELFV. For
example:
RESET CSASELFV
CSASELFV.GENERAL-INFORMATION
CSASELFV.FIELD-SPECIFICATION(*)
The sample subprogram must also contain a SET KEY ALL statement.
For an example of how to invoke the CSUBLDRP utility, refer to the
CUSCSRP subprogram in the SYSCST library.
|
PDAs used |
|
Files accessed |
|
CSUBMIT Subprogram (Mainframe)
CSUBMIT |
Description |
What it does |
Submits a job for execution. The JCL for the job
must be in the source buffer.
Note: This subprogram is used in conjunction with the CSUSUB command.
For more information, refer to JCL Submit Utility
(Mainframe), Natural Construct
Generation.
|
PDAs used |
|
Files accessed |
|
CSUBYTES Subprogram
CSUBYTES |
Description |
What it does |
Calculates the required bytes for a field, based
on the field’s Natural format and length. This subprogram receives the length
and format of a field and returns the number of bytes occupied by the
field.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEBYTES ***** Construct Related Subprograms ***** CTEBYTE1
Feb 25 - Driver for subprogram CSUBYTES - 03:49 PM
Field Format: _ Bytes.......:
Field Length: ____________
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUCASE Subprogram
CSUCASE |
Description |
What it does |
Converts a string to upper/lower/mixed case.
This subprogram receives a string and a desired function. It converts and
returns the string as follows:
-
If the function is "U", this
subprogram converts all alpha characters in the string to upper case.
-
If the function is "L", it converts
all alpha characters to lower case.
-
If the function is "M", it converts
the alpha characters as follows:
-
Removes leading hash (#) or plus (+) characters
-
Replaces all dashes (-) and underscores (_) with blanks
-
Converts the first character, as well as all characters
following a dash or underscore, to upper case
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTECASE N a t u r a l C o n s t r u c t CTECASE1
Aug 14 Driver for subprogram CSUCASE 1 of 1
Function: _ U=Upper, L=Lower, M=Mixed Case
String..: _________________________________________________________________
___________________________________
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUCCMD Subprogram
CSUCCMD |
Description |
What it does |
Generates command block delimiters into the
Natural source buffer for super models (generate multiple modules). This
subprogram receives a command type, an eight-character module name, a module
type, and, optionally, a model name.
Natural Construct evaluates the contents of these command blocks
after it processes the pre-generation subprogram for the super model. Before
continuing the generation, Natural Construct either creates the child model
specification or saves, stows, and catalogs the contents of the command block.
CSUCCMD must always be called twice — first to initialize the
command block and then to close it after generating the contents of the command
block.
Notes:
- See the CSLCCMD local data area for valid command
values.
- You cannot use nested command blocks.
|
PDAs used |
|
Files accessed |
|
CSUCENTR Subprogram
CSUCENTR |
Description |
What it does |
Centers a text string. This subprogram centers
text, such as headings, within a variable. The length passed to this subprogram
should be one of the following:
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTECENTR N a t u r a l C o n s t r u c t CTECNTR1
Aug 14 Driver for subprogram CSUCENTR 1 of 1
Length: ___
String: _________________________________________________________________
___________________________________
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUCOMPR Subprogram
CSUCOMPR |
Description |
What it does |
Generates an IF clause for two structures. The
subprogram receives two structure names and a list of underlying components to
compare. It generates the IF clause according to the criteria requested (LT,
LE, GT, GE).
Note: DB2 users should use the CSUDB2SP subprogram to compare key
values (see CSUDB2SP
Subprogram for a description).
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTECOMPR N a t u r a l C o n s t r u c t CTECOMP1
Aug 14 Driver for subprogram CSUCOMPR 1 of 1
Comparison Operator.: __ Lhs Structure: ________________________________
Tab.................: ___ Rhs Structure: ________________________________
No. Of Components...: ___
Component Fld Name
+----------------------------------+
1__ | ________________________________ |
| ________________________________ |
| ________________________________ |
| ________________________________ |
| ________________________________ |
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit bkwrd frwrd mai |
CSUCTRL Subprogram
CSUCTRL |
Description |
What it does |
Retrieves information from the
Natural Construct control record and sets the
PF-keys, help indicator, underscore characters, position indicators, disable
indicator, scroll indicator, "of" right prompt, and
dynamic attributes for Natural Construct.
|
PDAs used |
|
Files accessed |
|
CSUCURS Subprogram
CSUCURS |
Description |
What it does |
Determines the position of the field in which
the cursor is placed. This subprogram is invoked when runtime translation is
requested. It determines the message numbers and positions associated with
fields in a translation LDA and invokes the CSUTLATE subprogram to perform
runtime translation. For more information, see
CSUTLATE
Subprogram.
|
Parameters/PDAs used |
|
Files accessed |
|
CSUCURS1 Subprogram
CSUCURS1 |
Description |
What it does |
Determines the position of a single field in
which the cursor is placed. This subprogram is invoked whenever runtime
translation of a single field is requested. It determines the message number
and position associated with the field and invokes the CSUTLATE subprogram to
perform runtime translation. For more information, see
CSUTLATE
Subprogram.
|
Parameters/PDAs used |
|
Files accessed |
|
CSUDB2SP Subprogram
CSUDB2SP |
Description |
What it does |
Generates a FIND statement for a
superdescriptor. This statement retrieves DB2 records based on a complex key
definition. If a complex key is composed of 5 fields (Field1, Field2, Field3,
Field4, and Field5), for example, the generated FIND/WHERE clause is:
Field1 GE #INPUT.Field1
SORTED BY Field1
Field2
Field3
Field4
Field5
WHERE Field2 GE #INPUT.Field2
AND Field3 GE #INPUT.Field3
AND Field4 GE #INPUT.Field4
AND Field5 GE #INPUT.Field5
OR Field1 GE #INPUT.Field1
AND Field2 GE #INPUT.Field2
AND Field3 GE #INPUT.Field3
AND Field4 GT #INPUT.Field4
OR Field1 GE #INPUT.Field1
AND Field2 GE #INPUT.Field2
AND Field3 GT #INPUT.Field3
OR Field1 GE #INPUT.Field1
AND Field2 GT #INPUT.Field2
OR Field1 GT #INPUT.Field1
Note: #INPUT is the qualifier for the RHS fields of the in
equations.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEDB2SP N a t u r a l C o n s t r u c t CTEDB2S1
Aug 14 Driver for subprogram CSUDB2SP 1 of 1
*File Name.........: ________________________________ Find Next Record: _
*Field Name........: ________________________________
Function..........: ________________________________
LHS Structure.....: ________________________________
LHS Index.........: _______________
RHS Structure.....: ________________________________
RHS Index.........: ________________________________
Prefix Length.....: ___
Low Key Structure : ________________________________
High Key Structure: ________________________________
Tab...............:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUDELFF Subprogram
CSUDELFF |
Description |
What it does |
Deletes the lines containing */ in the edit
buffer. This subprogram searches for and deletes the lines containing */ in the
edit buffer. These lines are written by WRITE/PRINT statements when the DEFINE
PRINTER OUTPUT 'SOURCE' statement is used.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEDELFF N a t u r a l C o n s t r u c t CTEMAP1
Aug 14 Driver for subprogram CSUDELFF 1 of 1
+------------------------------------+
| |
| PRESS ENTER TO EXECUTE. |
| |
+------------------------------------+
Read in New Source: _
*New Source Name...: ________
New Source Library: DEVEX___
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUDEFLT Subprogram
CSUDEFLT |
Description |
What it does |
Provides default specification values for
Natural Construct models. This subprogram provides
an interface between generated applications and the user-maintained CSXDEFLT
sample exit subprogram. To override the default settings, modify CSXDEFLT. The
CCDEFLTA, CCDEFLTL, and CCDEFLTN copycode members return defaults for
alphanumeric, logical, and numeric values, respectively.
|
PDAs used |
|
Files accessed |
|
CSUDYNAT Subprogram
CSUDYNAT |
Description |
What it does |
Builds parameters containing dynamic attributes.
This subprogram receives a set of dynamic attribute characters in the
CSADYNA.#ATTRIBUTE-CHARS(A11/1:13) field and builds the definition for the DY=
parameter. The positioning within this array indicates the type of dynamic
attribute assigned. The positions and attributes are:
-
1 (normal intensity)
-
2 (intensified)
-
3 (blinking)
-
4 (cursive/italic)
-
5 (underlined)
-
6 (reversed video)
-
7 (blue)
-
8 (green)
-
9 (neutral/white)
-
10 (pink)
-
11 (red)
-
12 (turquoise)
-
13 (yellow)
For example, if you enter:
#ATTRIBUTE-CHARS(1) = '}'
#ATTRIBUTE-CHARS(2) = '{'
This subprogram returns:
#DY-PARAMETER = DY={I
If the caller’s attributes are printable special characters, they
are represented literally. Otherwise, they are represented using the HH
syntax.
Notes:
- The dynamic attribute character specified in position 1,
which corresponds to normal intensity, is always coded at the end of the DY=
parameter.
- Programs containing those represented in hex may not be
portable.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEDYNAT N a t u r a l C o n s t r u c t CTEDYNT1
Aug 14 Driver for subprogram CSUDYNAT 1 of 1
Attribute Characters
--------------------
(1) Normal Intensity..: _ (8) Green.............: _
(2) Intensified.......: _ (9) Neutral (white)...: _
(3) Blinking..........: _ (10) Pink..............: _
(4) Cursive/Italic....: _ (11) Red...............: _
(5) Underlined........: _ (12) Turquoise.........: _
(6) Reversed Video....: _ (13) Yellow............: _
(7) Blue..............: _
Dynamic Attribute Parameter:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUEMLEN Subprogram
CSUEMLEN |
Description |
What it does |
Determines the number of characters (bytes)
required to display an edit mask. This subprogram receives the name of an edit
mask and the format of the field to which the edit mask is applied. It returns
the number of characters (bytes) required to display the edit mask.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEEMLEN N a t u r a l C o n s t r u c t CTEMLEN1
Aug 14 Driver for subprogram CSUEMLEN 1 of 1
Edit Mask.....: ______________________________________________________
Field Format..: __
Display Length:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUENDX Subprogram
CSUENDX |
Description |
What it does |
Generates the end of a user exit prompt. This
subprogram is used by sample subprograms that generate multiple user exits.
Call this subprogram after each user exit is generated.
Note: You do not need to call this subprogram after the last user
exit.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEENDX N a t u r a l C o n s t r u c t CTEMAP1
Aug 14 Driver for subprogram CSUENDX 1 of 1
+------------------------------------+
| |
| PRESS ENTER TO EXECUTE. |
| |
+------------------------------------+
Read in New Source: _
*New Source Name...: ________
New Source Library: DEVEX___
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUFDEF Subprogram
CSUFDEF |
Description |
What it does |
Validates a field definition. This subprogram
receives the Natural format and length of a field and a list of invalid field
formats to disallow. To disallow control variables as input variables, for
example, list the invalid formats in the CSAFDEF.#INVALID FORMATS field. If the
field definition is valid, nothing is returned in CSUFDEF.
If the field definition is invalid, CSASTD.MSG and
CSASTD.ERROR-FIELD contain an error message and the invalid component of the
field (FIELD-FORMAT, DECIMALS, or UNIT).
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEFDEF N a t u r a l C o n s t r u c t CTEFDEF1
Aug 14 Driver for subprogram CSUFDEF 1 of 1
Field Format...: _ Invalid Formats: __________
Field Length...: _____
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUFRVAR Subprogram
CSUFRVAR |
Description |
What it does |
Returns the parameters and conditions from the
model code frames. This subprogram receives a model name and traverses its code
frames. It returns the code frame parameters and conditions.
|
PDAs used |
|
Files accessed |
-
NCST-FRAME-LINES
-
NCST-MODEL
|
Drivers Menu Option
CTEFRVAR N a t u r a l C o n s t r u c t CTEFRVR1
Aug 14 Driver for subprogram CSUFRVAR 1 of 1
*Model Name: ________________________________
No. Of Conditions : 0
No. Of Frame Parms: 0
+---------------------------------------+--------------------------------+
| 1__ Conditions | 1__ Frame Parameters |
| -------------------------------- | -------------------------- |
| | |
| | |
| | |
| | |
| | |
+---------------------------------------+--------------------------------+
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit bkwrd frwrd mai |
CSUGEN Subprogram
CSUGEN |
Description |
What it does |
Issues a CALLNAT to the Natural
Construct Generate function for a specified module. This
subprogram receives the names of a model PDA and a model information PDA
(CSAMODEL, which must contain the name of the model) and uses the inputs to
generate the module code into the Natural source buffer. When the CALLNAT is
made to the module, the code is appended to the contents of the source buffer.
The source buffer name or type does not change.
Notes:
- The specified model PDA must contain the model parameters
required for generation.
- This subprogram requires a NATPARM SSIZE of 55 or
greater.
|
PDAs used |
-
CSAGEN
-
CSAMODEL
-
CU--PDA
-
CSASTD
|
Files accessed |
|
CSUHEADS Subprogram
CSUHEADS |
Description |
What it does |
Separates a line of headings into separate
headings. This subprogram receives a line of headings and returns three
separate headings (each with the length of longest heading).
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEHEADS N a t u r a l C o n s t r u c t CTEHEAD1
Aug 14 Driver for subprogram CSUHEADS 1 of 1
Headings: ______________________________ Field Headings Stacked
----------------------
Field Heading Width: 0
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUINCL Subprogram
CSUINCL |
Description |
What it does |
Inserts the source for all copycode (currently
in the edit buffer) into the edit buffer.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEINCL N a t u r a l C o n s t r u c t CTEMAP1
Aug 14 Driver for program CSUINCL 1 of 1
+------------------------------------+
| |
| PRESS ENTER TO EXECUTE. |
| |
+------------------------------------+
Read in New Source: _
*New Source Name...: ________
New Source Library: DEVEX___
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUIS Subprogram
CSUIS |
Description |
What it does |
Verifies whether the contents of an alphanumeric
field can be converted to a specified format and length. If the format and
length are invalid Natural formats, CSASTD.MSG
contains an error message when this subprogram is invoked. If the format and
length are valid, CSASTD.MSG is blank.
In some cases, a user must specify a value using a certain
(variable) format and length. For example, the minimum/maximum key values
should be valid values corresponding to the format and length of the key. You
cannot use the Natural IS function because the format is not known until
runtime.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEIS N a t u r a l C o n s t r u c t CTEIS1
Aug 14 Driver for subprogram CSUIS 1 of 1
Field Value.: __________________________________________________
Field Format: _
Field Length: ___
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSULABEL Subprogram
CSULABEL |
Description |
What it does |
Verifies a Natural looping label. This
subprogram receives a string of characters and validates it against the Natural
label naming convention. ; if the label is not valid, CSASTD.MSG contains an
error message.
-
If the label is valid, CSASTD.MSG is blank
-
If the label is not valid, CSASTD.MSG contains an error
message
|
Parameters/PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTELABEL N a t u r a l C o n s t r u c t CTELABL1
Aug 14 Driver for subprogram CSULABEL 1 of 1
Label: ________________________________
Msg..: __________________________________________________________________
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSULENGT Subprogram
CSULENGT |
Description |
What it does |
Builds an input prompt and calculates the length
of the heading. This subprogram receives a field name, format, and length. It
builds the input prompt from the field headings (if no heading was given, the
field name is converted to mixed case) and calculates the length from the
format, length, and edit mask. It also returns the heading length and sign
option (based on the field format and edit mask).
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTELENGT N a t u r a l C o n s t r u c t CTELNGT1
Aug 14 Driver for subprogram CSULENGT 1 of 1
Field Name....: ________________________________ Field Length....: ______
Field Headings: ______________________________ Field Format....: _
: ______________________________ Sign............: _
: ______________________________
Edit Mask.....: ______________________________________________________
Input Prompt..: Heading Length..:
Sg Option.....: Fld Displ Length:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSULPS Subprogram
CSULPS |
Description |
What it does |
Changes the display language (*Language value)
and sets the translation required flag to True. This subprogram displays a list
of all available languages supported by Natural. When a new language is
selected, it switches the user’s session to that language and sets the
translation required flag to True.
|
Parameter/PDAs used |
|
Files accessed |
|
CSUMAX Subprogram
CSUMAX |
Description |
What it does |
Generates the assignment of a maximum value for
a field. This subprogram receives the name, format, and length of a variable
and generates the assignment of the maximum value for the field into the edit
buffer. It is used when reading a file for all values with a specified prefix,
where the suffix extends from the lowest to the highest value.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEMAX N a t u r a l C o n s t r u c t CTEMAX1
Aug 14 Driver for subprogram CSUMAX 1 of 1
Field : _________________________________________________________________
Format: _
Length: _____
Tab...: __
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUMIMAX Subprogram
CSUMAX |
Description |
What it does |
Generates the assignment of a minimum value for
a field. This subprogram receives the name of a variable and its format and
length. It generates the assignment of the minimum/maximum values for the field
into the edit buffer.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEMIMAX N a t u r a l C o n s t r u c t CTEMIMX1
Aug 14 Driver for subprogram CSUMIMAX 1 of 1
Field : _________________________________________________________________
Format: __ Minimum Value: _ Non Negative Min/Max: _ Tab: __
Length: _____ Descending...: _ DB2 Date/Time Stamp : _
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUMODEL Subprogram
CSUMORE |
Description |
What it does |
Returns information about a Natural
Construct model. This subprogram receives the name of a model and
returns the model description, generator mode and type, and the names of the
model PDA, subprograms, and code frames.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEMODEL N a t u r a l C o n s t r u c t CTEMODL1
Aug 14 Driver for subprogram CSUMODEL 1 of 1
*Model Name.......: ________________________________
Model Description:
No. Modify Subps: Modify Subps Code Frames Clear Subp...:
No. Code Frames : ------------ ----------- Read Subp....:
Generator Mode..: Save Subp....:
Generator Type..: Pre-Gen Subp.:
Display Window..: Post-Gen Subp:
Start Comment...: Doc Subp.....:
End Comment.....: Pda Name.....:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUMORE Subprogram
CSUMORE |
Description |
What it does |
Builds the initial assignment for the
LEFT-MORE/RIGHT-MORE array. This subprogram receives a function (L for the
LEFT-MORE array, R for the RIGHT-MORE) and the number of panels used by a
program. These arrays contain the prompts displayed at the top left or right
corner of the panels. The prompts indicate the number of panels located to the
left or right of the current panel.
For example, to generate the initial value for the
LEFT-MORE-PROMPT array for a program with two panels, enter:
CSAMORE.#LEFT-RIGHT = 'L'
CSAMORE.#MAX-WINDOW = 2
The subprogram writes the following to the source buffer: INIT < ' ','<1 more' >
To generate the initial value for the RIGHT-MORE-PROMPT array for
a program with two panels, enter:
CSAMORE.#LEFT-RIGHT = 'R'
The subprogram writes the following to the source buffer: INIT < '1 more >','' >
Note: If the value of *Language is not 1 during generation, the word
"more" is not included in the initial values.
Tip: Use a scalar field rather than an occurrence of this array.
Before the map is displayed, assign the array occurrence to the scalar field.
Using arrays on maps makes them difficult to maintain and less suitable to use
as standard layouts.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEMORE N a t u r a l C o n s t r u c t CTEMORE1
Aug 14 Driver for subprogram CSUMORE 1 of 1
Left/Right: _ (L or R)
Max Windows: __
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
Note:
For more information on changing the size of the left or right
prompt, see Use CSXDEFLT
Overrides.
CSUMPBOX Subprogram
CSUMPBOX |
Description |
What it does |
Handles the map edit buffer. This subprogram
receives a function and parameters (in CSAMPBOX). It initializes the map edit
buffer or generates variable, array, and text control blocks into the edit
buffer.
|
PDAs used |
|
Files accessed |
|
CSUMPCPR Subprogram
CSUMPCPR |
Description |
What it does |
Replaces the map settings in the edit buffer
with values from the CSAMPSET parameter data area.
|
PDAs used |
|
Files accessed |
|
CSUMPDUP Subprogram
CSUMPDUP |
Description |
What it does |
Checks for the duplication of fields on a map.
This subprogram determines whether there are any fields duplicated in the
CSAMPFLD.FIELD-INFO(*) structure. If there are duplicate fields, CSASTD.MSG
contains an error message when this subprogram is invoked.
|
PDAs used |
|
Files accessed |
|
CSUMPLAY Subprogram
CSUMPLAY |
Description |
What it does |
Loads the map layout into the edit buffer and
returns the map settings. This subprogram receives the name, layout, and type
of map and loads the specified map into the edit buffer. It returns the map
settings.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEMPLAY N a t u r a l C o n s t r u c t CTEMPLY1
Aug 14 Driver for subprogram CSUMPLAY 1 of 1
*Layout..: ________ Error Code : Dc: Zp............:
Map Version: Ps: Pm............:
Profile....: Ls: Cursor Skip...:
Delimiter Class..: Std Keys......:
Ad...............: Justification :
Delimiter Char...: Col Shift.....:
Cd...............: Case Deflt....:
Write Statement..: CV.........: Auto Rule Rank:
Input Statement..: Filler Char: Enforce Attr..:
Help.............:
Help-As-Fld-Deflt:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUMPMMS Subprogram
CSUMPMMS |
Description |
What it does |
Merges the settings for two maps. This
subprogram merges the map settings from CSAMPSET and CSAMPOUT. The settings in
CSAMPSET override the settings in CSAMPOUT and the result is stored in
CSAMPOUT.
|
PDAs used |
|
Files accessed |
|
CSUMPOVL Subprogram
CSUMPOVL |
Description |
What it does |
Checks the boundary on a map and determines if
there are overlapping fields. This subprogram checks whether the fields
specified in CSAMPFLD exceed the line size or page size of the available map
panel.
The available map panel is a block of consecutive lines on the
panel. This block is determined by the specified page and line size, excluding
the map layout and any PF-keys. The fields on the map cannot overlay the layout
or PF-keys.
|
PDAs used |
|
Files accessed |
|
CSUMPREG Subprogram
CSUMPREG |
Description |
What it does |
Determines the available map area in a map
layout. This subprogram determines the first and last line on a map that is
available for editing in a specified map layout.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEMPREG N a t u r a l C o n s t r u c t CTEMPRG1
Aug 14 Driver for subprogram CSUMPREG 1 of 1
*Layout: ________ First Available Line: Layout Page Size:
Last Available Line: Layout Line Size:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUMPTAB Subprogram
CSUMPTAB |
Description |
What it does |
Calculates the absolute field coordinates on a
map and creates the field prompts. This subprogram receives field information
from CSAMPFLD and returns the absolute field positions and prompts in CSAMPX-Y.
Dots are added to each field prompt in a region to extend its length to that of
the longest prompt in that region (... for ISA format and . . . for SAA
format).
Note: For more information about the data returned, refer to the
CSAMPX-Y data area in the SYSCST library.
|
PDAs used |
|
Files accessed |
|
CSUMPTST Subprogram
CSUMPTST |
Description |
What it does |
Tests the specifications for the map currently
in the edit buffer.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEMPTST N a t u r a l C o n s t r u c t CTEMTST1
Aug 14 Driver for subprogram CSUMPTST 1 of 1
Read in New Map: _ Page Size: 23_
*Map Name.......: ________ Line Size: 80_
Map Library....: DEVEX___
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUNATFM Subprogram
CSUNATFM |
Description |
What it does |
Builds a valid Natural format definition from
the formats and lengths specified. This subprogram receives the format and
length values and combines these to build a valid Natural format string. For
example, if you enter:
CSANATFM.FIELD-LENGTH = 9.0
CSANATFM.FIELD-FORMAT = 'P'
CSUNATFM produces the following output: CSANATFM.#Natural-FORMAT = P9 |
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTENATFM ***** Construct Related subprograms ***** CTENTFM
Feb 25 - Driver for subprogram CSUNATFM - 03:50 PM
Field Format: _ NATURAL Format:
Field Length: ____________
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUNEWX Subprogram
CSUNEWX |
Description |
What it does |
Generates a new user exit prompt. This
subprogram receives the name of a user exit and generates a starting point
(DEFINE EXIT exit-name, for example) for the user
exit. It initiates a new user exit for sample subprograms that are capable of
generating more than one exit.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTENEWX N a t u r a l C o n s t r u c t CTENEWX1
Aug 14 Driver for subprogram CSUNEWX 1 of 1
User Exit Name: ________________________________
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--
help retrn quit |
CSUOG Subprogram
CSUOG |
Description |
What it does |
Comments out all code within a specified user
exit. This subprogram receives the name of a user exit and inserts comment
indicators at the beginning of each line of code within the specified exit.
Specify the name of the user exit in the #USER-EXIT (A65)
variable. For example, to comment out all code within the MOVE-TO user exit,
specify the following:
0040 01 #USER-EXIT (A65)
.
.
.
3800 #USER-EXIT := 'MOVE-TO'
3810 CALLNAT 'CSUOG' #USER-EXIT |
PDAs used |
|
Files accessed |
|
CSUPARMS Subprogram
CSUPARMS |
Description |
What it does |
Returns the value of a NATPARM parameter. This
subprogram receives a NATPARM parameter and returns its corresponding value.
Valid NATPARM parameters are:
Note: For information about INPUT/OUTPUT parameters, refer to the
CSAPARMS data area in the SYSCST library.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEPARMS N a t u r a l C o n s t r u c t CTEPARM1
Aug 14 Driver for subprogram CSUPARMS 1 of 1
Parameter....: __ (ID,CF,UL,TB,IA,DC,KD,ML)
Alpha Value..:
Numeric Value:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUPARTY Subprogram
CSUPARTY |
Description |
What it does |
Determines Natural data types and returns the
byte length. This subprogram receives the format and length for a data type and
indicates whether it is a valid Natural data type. If it is, this subprogram
returns the byte length.
|
PDAs used |
|
Files accessed |
|
CSUPPER Program
CSUPPER |
Description |
What it does |
Converts the contents of the source buffer into
upper case. This program reads through the source buffer and converts specified
lower case characters into upper case.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEPPER N a t u r a l C o n s t r u c t CTEMAP1
Aug 14 Driver for program CSUPPER 1 of 1
+------------------------------------+
| |
| PRESS ENTER TO EXECUTE. |
| |
+------------------------------------+
Read in New Source: _
*New Source Name...: ________
New Source Library: DEVEX___
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUREADS Subprogram
CSUREADS |
Description |
What it does |
Reads the specification parameters for a module.
This subprogram receives the name of a source module. If the module was
generated using Natural Construct, the subprogram reads the source code and
returns the model parameter data area (PDA) containing the parameters used to
generate the module.
You can use the passed model PDA to call the model subprograms for
the model used to generate the module.
This subprogram also returns a data area describing the model and
listing the names of the model subprograms.
Note: This subprogram requires a NATPARM SSIZE of 55 or
greater.
|
Parameters/PDAs used |
-
#READ-THIS-MODULE(A8)
-
CSAMODEL
-
CU--PDA
-
CSASTD
|
Files accessed |
|
Tip:
If you know the name of the model used to generate the specified
module, you can pass its model PDA to CSUREADS rather than CU--PDA. After the
call to CSUREADS, the model PDA is populated with the parameters used to
generate that module.
CSUREF Subprogram
CSUREF |
Description |
What it does |
Generates referential integrity checks against
foreign files. This subprogram is typically called three times: once to
generate the data structures (DATA) required by the generated code, once to
generate the update edits (UPDATE), and once to generate the delete edits
(DELETE). Set the value of CSAREF.FUNCTION-CODE to either DATA, UPDATE, or
DELETE.
After the first call, this subprogram returns the number of update
and delete edits found. This avoids unnecessary subsequent calls.
|
PDAs used |
|
Files accessed |
|
CSUSCAN Subprogram
CSUSCAN |
Description |
What it does |
Scans for the existence of a string in the edit
buffer. This subprogram receives a string and scans for (not absolute) the
existence of the string in the edit buffer.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTESCAN N a t u r a l C o n s t r u c t CTESCAN1
Aug 14 Driver for subprogram CSUSCAN 1 of 1
String..: _______________________________________________________________
Absolute: _ (Mark if scan string need not be delimited by special chars)
Found...: _
Read in New Source: _
*New Source Name...: ________
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUSELFV Subprogram
CSUSELFV |
Description |
What it does |
Selects fields/variables from views, LDAs, or
PDAs. This subprogram selects up to 40 fields/variables from up to 6 different
views, LDAs, or PDAs and appends the selected fields/variables to CSASELFV.
Existing fields/variables in CSASELFV cannot be re-selected.
When selecting from data areas, you cannot select the following:
-
constants
-
more than one structure
If you specify the select all option, then the first structure in
the data area is selected.
The invoking subprogram should issue an initial RESET statement to
clear the structures in CSASELFV, such as:
RESET CSASELFV
CSASELFV.GENERAL-INFORMATION
CSASELFV.FIELD-SPECIFICATION(*) |
PDAs used |
|
Files accessed |
|
CSUSETKY Subprogram
CSUSETKY |
Description |
What it does |
Returns PF-key definitions from the control
record to support variable PF-keys in Natural
Construct. The PF-key names are returned in the
CSASETKY.#PF-NAME(*) array. The index for each array element corresponds to the
PF-key number. The following example indicates that PF1 is named
"help": #PF-NAME(1) = 'help' |
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTESETKY N a t u r a l C o n s t r u c t CTESETK1
Sep 07 Driver for subprogram CSUSETKY 1 of 1
Pf Name Pf Number Pf Key
------- --------- ------
main Main......: 12 Pf Main......: PF12
retrn Return....: 2 Pf Return....: PF2
quit Quit......: 3 Pf Quit......: PF3
test Test......: 4 Pf Test......: PF4
bkwrd Backward..: 7 Pf Backward..: PF7
frwrd Forward...: 8 Pf Forward...: PF8
left Left......: 10 Pf Left......: PF10
right Right.....: 11 Pf Right.....: PF11
help Help......: 1 Pf Help......: PF1
Available1: 5 Pf Available1: PF5
Available2: 6 Pf Available2: PF6
Available3: 9 Pf Available3: PF9
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUSETW Subprogram
CSUSETW |
Description |
What it does |
Returns the SET CONTROL parameters to define a
window. This subprogram receives the parameters for a window (such as frame,
line size, column size, base line, and base column). It returns the SET CONTROL
parameters to define the window. For example, if the parameters are:
CSASETW.FRAME=TRUE
CSASETW.LINE-SIZE=70
CSASETW.COLUMN-SIZE=5
This subprogram returns: CSASETW.SET-CONTROL.PARM='WBFL70C5' |
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTESETW N a t u r a l C o n s t r u c t CTESETW1
Aug 14 Driver for subprogram CSUSETW 1 of 1
Frame......: _ Line Size..: ___ Base Line..: ___ Required Width : ___
Column Size: ___ Base Column: ___ Required Height: ___
Set Control Parm:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUSORT Program
CSUSORT |
Description |
What it does |
Sorts a 2-dimensional array based on specified
column positions. This subprogram receives a 2-dimensional array and sorts the
array based on the desired column positions. A Natural SORTSIZE is not required
because the sort uses an internal bubble sort algorithm.
Note: For an example of how to call this subprogram, refer to the
CSASORT data area.
|
Parameters/PDAs used |
-
CSASORT
-
#SORT-DATA(A1/1:V,1:V)
-
CSASTD
|
Files accessed |
|
CSUSPLIT Program
CSUSPLIT |
Description |
What it does |
Splits lines in the source buffer that are
longer than 72 characters. Only lines with code extending beyond column 72 are
split; lines with comments extending beyond column 72, but not code, are
ignored. If a text string (enclosed within quotes) extends beyond column 72,
the entire string is moved to the next line.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTESPLIT N a t u r a l C o n s t r u c t CTEMAP1
Aug 14 Driver for program CSUSPLIT 1 of 1
+------------------------------------+
| |
| PRESS ENTER TO EXECUTE. |
| |
+------------------------------------+
Read in New Source: _
*New Source Name...: ________
New Source Library: DEVEX___
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUSUB Program (Mainframe)
CSUSUB |
Description |
What it does |
Submits a job for execution. The JCL for the job
must be in the source buffer. This subprogram is used in conjunction with the
CSUSUB command. For information, refer to JCL Submit Utility
(Mainframe), Natural Construct
Generation.
|
PDAs used |
|
Files accessed |
|
CSUSUBP Subprogram
CSUSUBP |
Description |
What it does |
Returns information about a Natural
Construct model subprogram, such as the PF-key settings and the
window sizes. This subprogram receives the name of a model subprogram and
returns information about that subprogram. The information corresponds to the
data accessed through the Maintain Subprograms function.
Note: For more information, see
Maintain
Subprograms Function.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTESUBP N a t u r a l C o n s t r u c t CTESUBP1
Aug 15 Driver for subprogram CSUSUBP 1 of 1
Subprogram Name: ________
Description....:
Backward Forward Flag: Window Length : Key Name No. Other Keys: _
Left Right Flag......: Window Columns: --------
Test Key Flag........:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUTEST Program
CSUTEST |
Description |
What it does |
Tests the subprograms for Natural
Construct-generated models. This program tests the individual
subprograms for Natural Construct-generated models. For information, see
Test the Model
Subprograms.
|
PDAs used |
|
Files accessed |
-
NCST-SUBPROGRAM
-
NCST-CONTROL
|
Drivers Menu Option
CSUTEST N a t u r a l C o n s t r u c t CSUTESM1
Aug 14 Single Module Test Program 04:54 PM
Code Function *Model: ________________________________
---- ------------------- Number all subprograms to be executed
R Release Variables | |
* Execute All Subp. V |
1-9 Execute One Subp. _ Clear : ________ V
E Edit source _ Mod 1: ________ _ Mod 6: ________
C Clear Edit Buffer _ Mod 2: ________ _ Mod 7: ________
? Help _ Mod 3: ________ _ Mod 8: ________
. Terminate _ Mod 4: ________ _ Mod 9: ________
---- ------------------- _ Mod 5: ________ _ Mod 10: ________
_ _ Pregen: ________ _ Save : ________
Source _ Documt: ________ _ Postgn: ________
Lines
Total: 133 Frame Parameter or Exit Name
_ Other : ________ ________________________________
_ Other : ________ ________________________________
_ Other : ________ ________________________________
_ Other : ________ ________________________________
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSUTLATE Subprogram
CSUTLATE |
Description |
What it does |
Translates message text at runtime. This
subprogram receives a message number and position value and retrieves the
appropriate text. If the message text contains multiple items delimited by a
slash (/), the position value identifies which text is translated.
This subprogram is invoked from the CSUCURS and CSUCURS1
subprograms.
|
PDAs used |
|
Files accessed |
|
CSUTRANS Subprogram
CSUTRANS |
Description |
What it does |
Translates screen prompts before they are
displayed. This subprogram receives a defined data structure (typically a
translation LDA) containing SYSERR message numbers and translates them into the
appropriate text.
Notes:
- For more information, see
CSUTRANS
Utility.
- For information about SYSERR message numbers, see
Use SYSERR
References.
- For information about formatting the message text, see
Format SYSERR Message
Text.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTETRANS ***** Natural Related subprograms *****
Oct 21 - Driver for subprogram CSUTRANS - 1 of 1
Translation LDA .... CTE-MAL
Input Parameters ... #GEN-PROGRAM *2000.1,.___________
#SYSTEM *2000.2,+___________
#GDA *2000.3,>___________
#TITLE *2001.1,+/16________
#DESCS *2001.2,.___________
#GDA-BLOCK *2001.3,>___________
#MAP-HEADER1 *2049.1,./18________
#MAP-HEADER2 *2049.2,>/18________
#USE-MSG-NR *2050.1,.___________
#PASSWORD-CHECK *2050.2,./20________
#MESSAGE-LIBRARY CSTLDA__
#LDA-NAME CTE-MAL_
#TEXT-REQUIRED X
#LENGTH-OVERRIDE __________0
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help quit reset bkwrd frwrd right left |
Note:
This driver program is provided as a sample only. Because the
screen prompts translated by CSUTRANS vary depending on the application under
development, the driver program must be tailored to the application.
CSUXCHK Subprogram
CSUXCHK |
Description |
What it does |
Scans for the existence of a user exit in the
edit buffer. This subprogram receives the name of a user exit and scans the
edit buffer for that name.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEXCHK N a t u r a l C o n s t r u c t CTEXCHK1
Aug 14 Driver for subprogram CSUXCHK 1 of 1
User Exit Name....: ________________________________
Found.............:
Read in New Source: _
*New Source Name...: ________
New Source Library: DEVEX___
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CSU2LONG Subprogram
CSU2LONG |
Description |
What it does |
Converts a long variable name to an
abbreviation. This subprogram receives a long character string (32 characters)
and a desired length, and returns the truncated string (abbreviation). The
sixth position of the string is the first position truncated. If no length is
given, the default is 30.
If the long string is not longer than the desired length, the
string is still truncated. For example, if the long string is
"THIS-IS-A-LONG-VARIABLE" and the desired length is
20, the short string is "THIS-A-LONG-VARIABLE".
Tip: Use this subprogram when you add characters to a file or field
name that is already 32 characters long.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTE2LONG N a t u r a l C o n s t r u c t CTE2LNG1
Aug 14 Driver for subprogram CSU2LONG 1 of 1
Long Name.....: ________________________________
Maximum Length: ___
Short Name....:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
Predict-Related Subprograms (CPU*)
The subprograms described in this section retrieve information from the
Predict data dictionary. While some of these
subprograms generate code, most supply information to the calling subprogram
and the calling subprogram generates the code.
Notes:
- If you use Software AG’s Entire
Net-work, the Predict data can reside on a platform other than
the platform on which Natural Construct is
running.
- Driver programs for many of the supplied programs/subprograms are
available through the Drivers menu option on the Administration main menu. If a
driver program is available, its location is listed in the Drivers
Menu Option section in the program/subprogram’s description. For more
information about the supplied driver programs, see
Drivers Menu
Function.
This section covers the following
topics:
With Natural Security Installed
If Natural Security is installed, the
Predict-related subprograms restrict access to file and field information.
Users can only retrieve information for files linked to the current
application.
While generating a program, the program may access information about
the same file many times. To avoid security checks each time, the access
subprograms use the FILE-CODE field. This INPUT/OUTPUT field accesses file
information and acts as a cipher code to avoid multiple security checks on the
same file; it is available for all supplied subprograms.
If you are developing under Natural Security, include the FILE-CODE
field in the model PDA for each file used multiple times during generation. The
FILE-CODE field is passed in the PDA of the access subprogram and reassigned
back to the model PDA after each call.
To avoid security checks for each access, the model subprogram that
invokes CPUEL contains the following statements:
ASSIGN CPAEL.FILE-CODE = #PDA-FILE-CODE
CALLNAT 'CPUEL' CPAEL CSASTD
ASSIGN #PDA-FILE-CODE = CPAEL.FILE-CODE
Note:
For an example of using these subprograms to restrict access to file
and field information, refer to the CUSCGPR program in the SYSCST
library.
CPU-OBJ Subprogram
CPU-OBJ |
Description |
What it does |
Generates an external data area based on a
Predict file view. This subprogram receives the view
name and a set of logical variables that define the generation options. It
generates an external data area structure to match the view. It can also
generate the C# variables for each C* variable that corresponds to an MU or PE
and/or includes the corresponding REDEFINE fields for redefined fields or
superdescriptors.
Note: For information about INPUT/OUTPUT parameters, refer to the
CPA-OBJ data area in the SYSCST library.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTE-OBJ N a t u r a l C o n s t r u c t CTE-OBJ1
May 12 Driver for subprogram CPU-OBJ 1 of 1
*File: ________________________________
Build Redefines..: _ Structure Level: _
SuperDe Redefines: _ Joined Fld Name: ________________________________
Cstars...........: _ Joined Length..: ___
Use Cutoff.......: _ Cutoff Value...: ________
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CPU-OBJ2 Subprogram
CPU-OBJ2 |
Description |
What it does |
Issues CALLNAT to the #CALLNAT subprogram and
passes information about elements that make up an object. This subprogram
receives:
An object is derived from view and key names. The view and key
names are based on intra-object relationships defined in
Predict (for example, ORDER-HEADER-HAS-ORDER-LINES).
The elements of an object are the individual fields in the files
that make up the object. This subprogram traverses the object tree and checks
each element. For each element, it CALLNATs the #CALLNAT subprogram and passes
it information about the element (for example, the format, length, and type).
You can set options to limit or extend the number of elements to
check (for example, whether to include all field redefinitions or just the
lowest levels).
Note: This subprogram replaces the CPU-OBJ subprogram; for all new
development, use CPU-OBJ2.
|
Parameters/PDAs used |
-
CPA-OBJ2
-
CPA-ODAT
-
CU--PDA
-
#PASS(A1/1:V)
-
CSASTD
|
Files accessed |
|
CPU-OREL Subprogram
CPU-OREL |
Description |
What it does |
Adds entity information to a table. This
subprogram receives the name of an object and information about each entity
belonging to the object. It adds this information to a table. Optionally, it
can display tracing information.
Note: For more information, refer to
CPA-OREL.ENTITY(*).
|
PDAs used |
|
Files accessed |
-
SYSDIC-RL
-
SYSDIC-FI
-
SYSDIC-EL
|
CPU-VIEW Subprogram
CPU-VIEW |
Description |
What it does |
Generates field definitions based on the
contents of a Predict view. This subprogram receives
the name of a Predict view and a set of logical parameters defining the options
to be generated. It generates the view definition as it should appear in the
DEFINE DATA . . . END-DEFINE block of a
Natural program, subprogram, or helproutine.
This subprogram can also generate the C# variables for each C*
variable that corresponds to an MU (multiple-valued) or PE (periodic group),
and/or includes the corresponding REDEFINE fields for redefined fields or
superdescriptors.
You can use this subprogram to define a structure based on a view
in Predict. The format and length for each field is generated.
Notes:
- This subprogram differs from CPU-OBJ in that it generates
internal rather than external data structures.
- For information about INPUT/OUTPUT parameters, refer to the
CPA-VIEW data area in the SYSCST library.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTE-VIEW N a t u r a l C o n s t r u c t CTE-VEW1
May 12 Driver for subprogram CPU-VIEW 1 of 1
*File....: ________________________________
View....: ________________________________ Gen 01 Level......: _
Omit Fld: ________________________________
Variable Indexes : _ Include Hyper DE...: _ Include MU Counter: _
Build Redefines..: _ Include Phonetic DE: _ Include PE Counter: _
SuperDe Redefines: _ Include Sub DE.....: _ Include MU Hyper..: _
Specify Formats..: _ Include Super DE...: _ Include PE Hyper..: _
Cstars...........: _ Redefine Cstars....: _
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CPUEL Subprogram
CPUEL |
Description |
What it does |
Returns Predict
information about a field in a file. This subprogram finds a field in a Predict
file and returns information about the field.
Note: CPUEL supports dynamic field lengths and AVs with
Adabas.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEEL ***** PREDICT Related Subprograms ***** CTEEL11
Feb 25,13 - Driver for subprogram CPUEL - 1 more >
*File Name..: ________________________________ DDM Prefix: ________________
*Field Name : ________________________________
Simple Outputs: _
Fld Found...: X ADABAS Fld Name: AA Fld Format....: A Field Uq : U
Ver Found...: Fld Length.....: 8.00 Dynamic.......: De Type..: D
Lvl Number..: 1 Sign...........: Suppression...: Gr Struct:
Occurrences.: Fld Type.......: A/Descend.....: A Pe Ind...:
Fld Redefined : Rank..........:
Edit Mask...: Field Headings:
DDM Fld Name: PERSONNEL-ID PERSONNEL
Index Name..: ID
Fld Sequence: 100
NAT Length..: PRD Length..: 8.00 PREDICT Format: A
IMS Fld Name: IMS Root Key: Access Lvl:
IMS Fld Len : IMS Offset..: Update Lvl:
Character Set:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
help retrn quit left right main |
Press Enter to display the second panel. For example:
CTEEL ***** PREDICT Related Subprograms ***** CTEEL21
< 1 more - Driver for subprogram CPUEL - 03:26 PM
File Name..: CST-EMPLOYEES
Field Name : PERSONNEL-ID
LEVEL
-----
DDM Field Name Field Type Is Redefined
Keyword Mask Keywords Returned
________________________________
________________________________
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
help retrn quit left right main
CPUEL completed normally. |
CPUELDE Subprogram
CPUELDE |
Description |
What it does |
Returns a description attribute from a specified
file. This subprogram receives the name of a file and finds a description
attribute. It returns the names of all fields that have the DESCRIPTION
keyword.
|
PDAs used |
|
Files accessed |
-
SYSDIC-FI
-
SYSDIC-EL
-
SYSDIC-KY
|
CPUELKY Subprogram
CPUELKY |
Description |
What it does |
Returns keywords linked to a field in a
specified file. This subprogram receives the name of a file and field; it
returns keywords linked to the field.
|
PDAs used |
|
Files accessed |
-
SYSDIC-FI
-
SYSDIC-EL
-
SYSDIC-KY
|
CPU-FREL Subprogram
CPU-FREL |
Description |
What it does |
Retrieves information about a foreign
relationship and CALLNATs a pass-through subprogram. This subprogram passes
CPA-FREL, CU--PDA, and CSASTD to the pass-through subprogram.
|
PDAs used |
-
CPARLRD
-
CU--PDA
-
CPA-FREL
-
CSASTD
|
Files accessed |
|
CPUELNX Subprogram
CPUELNX |
Description |
What it does |
Returns field-by-field information if it is
called repeatedly. This subprogram receives the name of a
Predict file, the CPAELNX data area (contains
options for field types), and the CPRELNX data area (contains information about
current processing), and logically reads through the fields in the file.
Notes:
- CPRELNX contains reserved variables that keep track of the
current position; it must not be modified by the calling program.
- For information about INPUT/OUTPUT parameters, refer to the
CPAELNX data area in the SYSCST library.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEELNX ***** PREDICT Related Subprograms ***** CTEENX11
Feb 25 - Driver for subprogram CPUELNX - 1 more >
*File Name....: _______________________________ First Time : X EOF.....:
DDM Prefix...: ________________
Redef Base Fld: _ Super Subs: _ Mus.......: _ Nulls Only : _ Counters: _
First Redefine: _ Phonetics : _ Pe Groups : _ Seq Only...: _ Groups..: _
All Redefines : _ Hypers....: _ Pes.......: _ Uq Only....: _ Fillers : _
Max Rede Rank : _ Derived...: _ Mus in Pes: _ VE Only....: _ REDE STR: _
Fld Name......: Fld Type...:
Fld Format....: Length.....:
PREDICT Format: Sign.......:
ADABAS Name...: Fld Def..: De Type..: Fld Count..: Rank..:
Level Number..: Fld Uq...: Pe Ind...: Occurrences:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit left right mai |
Press Enter to display the second panel. For example:
CTEELNX ***** PREDICT Related Subprograms ***** CTEENX21
< 1 more - Driver for subprogram CPUELNX - 03:38 PM
Field Headings
------------------------------
PERSONNEL IMS Offset....: Access Lvl:
ID IMS Fld Name..: Update Lvl:
IMS Fld Length:
Index Name..:
DDM Fld Name: PERSONNEL-ID
Edit Mask...:
Level Type Trail: -> -> -> -> -> -> ->
Redefine Trail..: -> -> -> -> -> -> ->
Fld is Redefined: Redefine Cnt:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit left right mai |
CPUELRD Subprogram
CPUELRD |
Description |
What it does |
Reads through the fields in a
Predict file, issues a CALLNAT for the specified
subprogram for each field, and passes information about the field to the
subprogram. It receives:
The subprogram traverses the specified file. For each selected
field, it CALLNATs the passed subprogram to process the current
field.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEELRD N a t u r a l C o n s t r u c t CTEELRD1
Aug 14 Driver for subprogram CPUELRD 1 of 1
*File Name.......: ________________________________ Fld Count......:
*Key Name........: ________________________________ Level..........:
CALLNAT..........: CTELRDSM Max Rede Rank..: _
ReDe Base Fld: _ SPs/SBs..: _ Pes...: _ Pe Group: _ Only VE..: _ Fillers: _
First ReDe...: _ Phonetics: _ Mus...: _ Mu in Pe: _ Only UQ..: _ Derived: _
All ReDe.....: _ Hypers...: _ Groups: _ Counters: _ Only Null: _ Rede St: _
Fld Name : Format : PRD Format :
DDM Field : Fld UQ : Length.....:
Index.... : Type...: Adabas Name:
Headings : De Type: Occurrences:
Pe Type: :
Edit Mask : Rank...: :
Type Trail: Redef..: ReDe Count :
ReDe Trail:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit bkwrd frwrd mai |
Note:
If you change the name of the subprogram in the CALLNAT field, the
specified subprogram must have the same parameters as those in the PDAs used by
CPUELRD.
CPUELVE Subprogram
CPUELVE |
Description |
What it does |
Returns the verification rule names for a field
in a file. This subprogram finds a field in Predict
and returns the names of the verification rules of type N (Natural
Construct).
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEELVE N a t u r a l C o n s t r u c t CTEELVE1
Aug 14 Driver for subprogram CPUELVE 1 of 1
*File Name : ________________________________ Field Found.........:
*Field Name: ________________________________ Num of Verifications:
+----------------------------------+
| 1__ VERIFICATION NAME |
| ------------------------------- |
| |
| |
| |
| |
| |
+----------------------------------+
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit bkwrd frwrd mai |
CPUEXIST Subprogram
CPUEXIST |
Description |
What it does |
Verifies the existence of a specified
Predict object. This subprogram receives the name
and type of an object and verifies its existence in Predict.
|
PDAs used |
|
Files accessed |
-
SYSDIC-SY
-
SYSDIC-PR
-
SYSDIC-KY
-
SYSDIC-DB
-
SYSDIC-FI
-
SYSDIC-RL
-
SYSDIC-VE
|
Drivers Menu Option
CTEXIST N a t u r a l C o n s t r u c t CTEXST1
Aug 14 Driver for subprogram CPUEXIST 1 of 1
Object Name: ________________________________ Object Exists:
Object Type: __ (SY,PR,KY,FI,DB,RL,VE)
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CPUFI Subprogram
CPUFI |
Description |
What it does |
Returns Predict
information about a file. This subprogram receives the name of a file and
returns Predict information about that file.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEFI N a t u r a l C o n s t r u c t CTEFI1
Aug 14 Driver for subprogram CPUFI 1 of 1
*File Name: ________________________________ Ripp File Nr..:
File Type: Ext File Nr..:
Master File Name..:
Primary Seq Field :
DDM Prefix........: IMS DB Number.: 00
DDM File Name.....: IMS File Level:
IMS Parent File...: IMS File Nr...: 00
IMS Root File Name: IMS Seg Type..:
IMS DBD Name......: IMS DDM Suffix:
IMS Seg Name......: DDM Matches...:
IMS Root Seg Name :
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CPUHOLD Subprogram
CPUHOLD |
Description |
What it does |
Determines the hold field for a file. This
subprogram receives the name of a file and determines the hold field for the
file. To define a hold field, attach the HOLD-FIELD keyword to the field in
Predict.
|
PDAs used |
|
Files accessed |
|
CPUKY Subprogram
CPUKY |
Description |
What it does |
Retrieves information related to a
Predict keyword. You can use the keyword comments to
store attribute values that can be returned by this subprogram.
|
PDAs used |
|
Files accessed |
|
CPUREDEF Subprogram
CPUREDEF |
Description |
What it does |
Generates redefinitions for compound keys,
superdescriptors, or redefined fields in Predict.
This subprogram invokes the CPUXPAND subprogram, which retrieves the components
of the field to be redefined. Redefinitions can be generated in either inline
or external data area format.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEREDEF N a t u r a l C o n s t r u c t CTERDEF1
Aug 14 Driver for subprogram CPUREDEF 1 of 1
*File : ________________________________ Redef Level.........: _
*Field: ________________________________ Change Format N to A: _
Super Options
-------------
Include Deriv Level: _ Inside Histogram: _
Include Redef Level: _ Omit Format.....: _
Resets Required:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CPURL Subprogram
CPURL |
Description |
What it does |
Returns information about a relationship in
Predict. This subprogram receives a Predict
relationship name and returns information about the relationship.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTERL N a t u r a l C o n s t r u c t CTERL1
Aug 14 Driver for subprogram CPURL 1 of 1
*Relationship Name: ________________________________ Relationship Found:
Relationship Type :
Relationship File Relationship Field Card
-------------------------------- -------------------------------- ----
Ddm Relationship Field Minimum Average Maximum
-------------------------------- ------- -------- -------
Constraint Type Upd: Db2 Constraint Name:
Constraint Type Del:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CPURLRD Subprogram
CPURLRD |
Description |
What it does |
Retrieves the Predict
relationships for a specified file, and optionally a specified type. This
subprogram receives:
It finds relationships for the specified file, issues a CALLNAT to
the specified subprogram, and passes the information about the relationship to
the subprogram for processing.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTERLRD N a t u r a l C o n s t r u c t CTERLRD1
Aug 14 Driver for subprogram CPURLRD 1 of 1
*File Name.............: ________________________________
Relationship Type.....: _
CALLNAT...............: CTELRDSM
Relationship Count....:
Relationship Name.....:
Relationship File ....:
Relationship Field....:
DDM Relationship Field:
Cardinality...........:
Minimum...............:
Average...............:
Maximum...............:
DB2 Constraint Name...:
Constraint Type Upd...:
Constraint Type Del...:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10-
help retrn quit |
CPUSUPER Subprogram
CPUSUPER |
Description |
What it does |
Returns the definition for a super/subdescriptor
(or DB2 compound key). This subprogram receives the name of a superdescriptor
or subdescriptor (or DB2 compound key) and the name of the
Predict file or table to which it belongs. It
returns information about the derived fields.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTESUPER ***** Predict Related Subprograms ***** CTESUPR1
Oct 09 - Driver for subprogram CPUSUPER - 03:08 PM
*File Name : ________________________________ Superde Length....:
*Field Name: ________________________________ Superde Format....:
Contains Repeating Fields: C#Derivation Group:
+-------------------------------------------------------------------------
| 1__ Start End A/ Fld Sup PE Dimension
| Source Field Name Char Char D Typ Opt Ind 1 2 3
| -------------------------------- ----- ----- - --- --- --- --- --- ---
|
|
|
|
|
+-------------------------------------------------------------------------
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit bkwrd frwrd mai |
CPUUNIQ Subprogram
CPUUNIQ |
Description |
What it does |
Determines the unique description field (primary
key). This subprogram receives the name of a file and determines the unique
description field (primary key) for the file.
|
PDAs used |
|
Files accessed |
|
CPUVE Subprogram
CPUVE |
Description |
What it does |
Prints verification rules to the source buffer.
This subprogram prints either the code or the data definition for a type N
(Natural Construct) verification rule to the source buffer.
|
PDAs used |
|
Files accessed |
|
Drivers Menu Option
CTEVE N a t u r a l C o n s t r u c t CTEVE1
Aug 14 Driver for subprogram CPUVE 1 of 1
Verification Name: ________________________________ Verification Found:
*User View Name...: ________________________________ Rule Generated....:
*DDM Field Name...: ________________________________
Generate Data....: _
Occurrences......: _______________
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit mai |
CPUVERUL Subprogram
CPUVERUL |
Description |
What it does |
Returns information about
Predict verification rules.
|
PDAs used |
|
Files accessed |
|
CPUXPAND Subprogram
CPUXPAND |
Description |
What it does |
Expands a super/subdescriptor or redefined
field. This subprogram receives:
-
the name of a super/subdescriptor (or DB2 compound key)
-
the name of the Predict file (or table) to which the key belongs
-
the expansion options
-
the name of a subprogram to CALLNAT (in CPAXPAND.INPUTS)
-
the parameters in the model PDA (CU--PDA)
-
an additional A1/1:v parameter (CSAPASS)
It expands the specified super/subdescriptor (or DB2 compound key)
into its underlying components. For each component, it CALLNATs the specified
subprogram.
Note: When this subprogram expands a superdescriptor, redefinitions
of the derived fields are included.
|
PDAs used |
-
CPAXPAND
-
CU--PDA
-
CSAPASS
-
CSASTD
|
Files accessed |
|
Drivers Menu Option
CTEXPAND N a t u r a l C o n s t r u c t CTEXPN11
Aug 14 Driver for subprogram CPUXPAND 1 of 3
*File Name......: ________________________________ Phantom Bytes: _
*Base Field Name: ________________________________ Fillers......: _
CALLNAT.........: CTELRDSM P
Base Field Information Field Headings
---------------------- --------------------------------
Sequence: Adabas Field Name: :
Format..: Field Definition : :
Length..: Field Type.......: :
Edit Mask......:
DDM Field Name :
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit left right mai |
Note:
If you change the name of the subprogram in the CALLNAT field, the
specified subprogram must have the same parameters as those in the PDAs used by
CPUXPAND.
Press Enter to display the second panel. For example:
CTEXPAND N a t u r a l C o n s t r u c t CTEXPN21
Aug 14 Driver for subprogram CPUXPAND 2 of 3
Derived Field Information Field Headings
------------------------- ----------------------------------
First Showing.: :
Field Count...: :
Whole Field...: :
Sequence......: Adabas Field Name: Start Character:
Format........: Field Definition : End Character:
Length........: Field Type.......:
Edit Mask.....:
Field Name....:
DDM Field Name:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit left right mai
Scrolling performed |
Press Enter to display the third panel. For example:
CTEXPAND N a t u r a l C o n s t r u c t CTEXPN31
Aug 14 Driver for subprogram CPUXPAND 3 of 3
Ascending/Descending
Expanded Field Information Field Headings
-------------------------- ----------------------------------
Field Count..: :
Offset Start..: :
Offset End....: :
Sequence......: Predict Format...: Special characteristic:
Format........: Field Definition :
Length........:
Edit Mask.....:
Field Name....:
DDM Field Name:
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF1
help retrn quit left right mai
Scrolling performed |
Predict-Related Helproutines (CPH*)
You can attach the following helproutines to fields that require the
input of Predict information. They are active helproutines that fill the field
to which they are attached.
Note:
Some of the following routines provide help information, although
they are coded as subprograms and not as helproutines. This provides greater
flexibility to access help information.
This section covers the following
topics:
CPHEL Subprogram
CPHEL |
Description |
What it does |
Browses the fields in a file for selection. This
subprogram receives the name of a Predict file. (If
no file name is specified, it provides file selection.) It browses all the
fields in the specified file and returns the selected field.
|
Attached to |
Input of a Predict field name. |
PDAs used |
|
Files accessed |
|
CPHELB Subprogram
CPHELB |
Description |
What it does |
Browses the fields in a file for selection. This
subprogram receives the name of a file and browses all the fields in the file
for selection. Optionally, this subprogram can browse only the descriptor
fields.
Note: For information about INPUT/OUTPUT parameters, refer to the
CPHELBA data area in the SYSCST library.
|
PDAs used |
|
Files accessed |
|
CPHFI Helproutine
CPHFI |
Description |
What it does |
Browses Predict
views/files for selection. This helproutine browses all the views and files in
Predict for selection.
|
Attached to |
Input of a Predict file name. |
Parameters used |
|
Files accessed |
|
CPHFIB Subprogram
CPHFIB |
Description |
What it does |
Browses Predict views
and files for selection.
|
Parameters/PDAs used |
|
Files accessed |
|
CPHPRED Helproutine
CPHPRED |
Description |
What it does |
Browses Predict
objects (by object type) for selection. This helproutine receives an object
type and browses the Predict objects of that type for selection. Valid object
types are:
-
S (system)
-
P (program)
-
K (keyword)
-
M (module)
-
R (report)
|
Attached to |
Input of a Predict object type. |
Parameters used |
-
#PDA-TYPE(A1)
-
#PDA-KEY(A32)
|
Files accessed |
-
SYSDIC-SY
-
SYSDIC-PR
-
SYSDIC-KY
-
SYSDIC-RE
-
SYSDIC-MO
|
CPHRL Helproutine
CPHRL |
Description |
What it does |
Browses the names of
Predict relationships for selection. This
helproutine receives the names of a Predict relationship and a file and returns
the selected relationship. If a file name is specified, the helproutine browses
only the Predict relationships for that file. If no file name is specified, it
browses all existing relationships.
|
Attached to |
Input of a Predict relationship name. |
Parameters used |
|
Files accessed |
|
CPHSET Helproutine
CPHSET |
Description |
What it does |
Sets a flag to indicate that help was requested
for a field. This helproutine receives the name of a parameter and sets a flag
to indicate help was requested. The parameter should be checked after the INPUT
statement. If a flag is set, for example, reset the flag and issue CALLNATs to
do the help processing.
This technique allows the helproutine to access all data entered
in a single panel transaction. When you generate a browse subprogram, for
example, you can type the file name (without pressing Enter) on the Additional
Parameters panel and request help for a field.
|
Attached to |
Any input field. |
Parameters used |
|
Files accessed |
|
General Purpose Generation Subprograms (CU--*)
The subprograms described in this section are general purpose generation
subprograms. These subprograms are identified by a CU--
prefix.
CU--EM Subprogram
CU--EM |
Description |
What it does |
Returns edit masks used by the generated
programs for displaying date and time fields. This subprogram can be changed to
suit your standards. Changes to this routine should be made in a higher level
steplib to minimize maintenance. Unless you modify your models, the date and
time field edit masks should not be longer than nine characters.
|
PDAs used |
|
CU--LRP Subprogram
CU--LRP |
Description |
What it does |
Returns the left and right prompt displayed on
the Natural Construct panels. The left prompt displays the current month and
day in *DATX (EM=LLL’’DD), which can be language sensitive. The right prompt
displays the "1 of 1" or "1 of
3" panel indicators, depending on the number of panels. This
prompt uses several control record fields to build the prompt position
indicators, which are compressed on both sides of the
"of" indicator.
|
Parameters/PDAs used |
-
#PDA-LEFT-PROMPT(A9)
-
#PDA-LEFT-INDICATOR(A4)
-
#PDA-RIGHT-PROMPT-OF(A4)
-
#PDA-RIGHT-INDICATOR(A4)
-
#PDA-RIGHT-PROMPT(A9)
-
CSASTD
|
CU--MSG Subprogram
CU--MSG |
Description |
What it does |
Returns the text for an application error
message. It receives a message number in #PDA-FRAME-PARM. After ensuring this
literal is numeric, it retrieves the short message for the SYSTEM application
and the *Language variable.
The error message is written (left-justified and enclosed within
single quotes) to the source buffer, thus substituting for the frame parameter.
The usual search criteria and defaults (English) apply. The following example
shows a code frame:
USE-MSG-NR 1
ASSIGN MSG-INFO.##MSG-NR = 8123 "
ELSE 1
ASSIGN MSG-INFO.##MSG = "
SUBPROGRAM:CU--MSG PARAM: 8123 N " |
PDAs used |
|
Files accessed |
|
CU--UL Subprogram
CU--UL |
Description |
What it does |
Returns the underscore line used on
Natural Construct panels. This subprogram receives
an underscore character set and creates the underscore line. The character(s)
specified on the control record (A4) is duplicated to fill the A80
length.
|
Parameters/PDAs used |
|