SysWorks©

SysWorks
Application Development Guide


Previous Contents Index

9.1 ACA Services

9.1.1 Contexts

Requirements for ACA Services contexts are summarized in Table 9-2.

Table 9-2 ACA Services Context Requirements
File Type Feature Sematics
.COL   ACA Services context source.
.CO   ACA Services context database.
.MMS_INC   Generated in the library directory by the BUILD RULES phase.

9.1.2 Repositories

Requirements for ACA Services repository are summarized in Table 9-3.

Table 9-3 ACA Services Repository Requirements
File Type Feature Sematics
.CRL, .CRL_IND   ACA Services repository source.
.CR   ACA Services repository database.
.MMS_INC   Generated in the library directory by the BUILD RULES phase.

9.2 ACMS

9.2.1 Applications

Requirements for ACMA applications are summarized in Table 9-4.

Table 9-4 ACMS Application Requirements
File Type Feature Sematics
.ADF   ACMS application source.
  _srv: ... server For each label ending in _srv: a search is made for the server name in ... clause. If found, is indicated a dependency upon the associated .TAG_IMG tag.
  %include ... Included source. Uses a dependency on a .TAG_TRS tag.
.ADB   ACMS application database generated by the COMPILE command or the BUILD DESCRIP phase.
.MMS_INC   Generated in the library directory by the BUILD RULES phase.
.TAG_TRS   Used to manage dependencies required by %include ... statements.
.TAG_IMG   Used to handle transitive dependencies to the servers used by the application.

The logical name appl_ACMS_REPLACE indicates whether to execute the .ADF source or use an appropriate ADU command. By default, this is assumed to have a value of false.

9.2.2 Menus

Requirements for ACMS menus are summarized in Table 9-5.

Table 9-5 ACMS Menu Requirements
File Type Feature Sematics
.MDF   ACMS menu source.
  menu is ... Names must also exist as .TDF sources and must either start with appl_MENUS. or start with appl and finish with _MNU.
  task is ... Names must also exist as .TDF sources and must either start with appl_TASKS. or start with appl and finish with _TSK.
.TAG_CDD   Used to manage dependencies required by the above statements.
.MDB   ACMS menu database generated by the COMPILE command or the DESCRIP BUILD phase.
.MMS_INC   Generated in the library directory by the BUILD RULES phase.

The logical name appl_ACMS_REPLACE indicates whether to execute the .MDF source or use an appropriate ADU command. By default, this is assumed to have a value of false.

9.2.3 Tasks

Requirements for ACMS tasks are summarized in Table 9-6.

Table 9-6 ACMS Task Requirements
File Type Feature Sematics
.TDF   ACMS task source.
  use workspaces ..., use workspace ..., workspaces are ..., worksspace is ... Names must also exist as .CDDL or .DDL sources and must either start with appl_DICTIONARY., appl_FIELDS., appl_RECORDS. or appl_REPOSITORY. start with appl and finish with _TSK.
  task is ..., tasks are ... Names must also exist as .TDF sources and must either start with appl_TASKS. or start with appl and finish with _TSK.
.TAG_CDD   Used to manage dependencies required by the above statements.
.MMS_INC   Generated in the library directory by the BUILD RULES phase.

The logical name appl_ACMS_REPLACE indicates whether to execute the .TDF source or use an appropriate ADU command. By default, this is assumed to have a value of false.

9.2.4 Task Groups

Requirements for ACMS task group are summarized in Table 9-7.

Table 9-7 ACMS Task Group Requirements
File Type Feature Sematics
.GDF   ACMS task group source.
  form[s] [{is|are}] A target of the form applFRM.EXE with a source of applFRM.OPT and .TAG_EP dependencies for each form will be generated. The applFRM.OPT file should also be generated - see .OPT file type below for details.
  server[s] [{is|are}]  
  cancel procedure  
  dcl process A target of the form server-name.TAG_IMG with a source of appl_GRP.TDB is generated.
  default object file  
  {initial|initialization} procedure [is] Generates a .TAG_EP dependency as described for procedures are below.
  procedure [server] image [is]  
  procedure[s] [{is|are}] Generates a .TAG_EP dependency for each procedure listed.
  {terminal|termination} procedure [is] Generates a .TAG_EP dependency as described for procedures are above.
  task[s] [{is|are}] Names must also exist as .TDF sources and must either start with appl_TASKS. or start with appl and finish with _TSK.
  workspace[s] [{is|are}] Names must also exist as .CDO sources and must either start with appl_RECORDS. or start with appl and finish with _REC. The with name syntax is supported by generating a target for the alternative name based on the original name.
.TAG_CDD   Used to manage dependencies required by the above statements.
.TDB   ACMS task database generated by the COMPILE command or the BUILD DESCRIP phase.
.MMS_INC   Generated in the library directory by the BUILD RULES phase.
.OPT   May be generated in the library directory to build a forms shareable image with a name of applFRM. To use this feature, a DEVTOOLS CONVERT/GENERATE appl_GRP.GDF applFRM.OPT command is required.

The logical name appl_ACMS_REPLACE indicates whether to execute the .GDF source or use an appropriate ADU command. By default, this is assumed to have a value of false.

9.3 ADA

Requirements for ADA are summarized in Table 9-8.

Table 9-8 ADA Requirements
File Type Feature Sematics
.ADA   ADA source.
.LIS, .OBJ   Generated in the library directory by the COMPILE command or the BUILD DESCRIP phase.
applOBJ.OLB   Created in the library directory to store the resultant object module.
.MMS_INC   Generated in the library directory by the BUILD RULES phase.

9.4 Basic

Requirements for Basic are summarized in Table 9-9.

Table 9-9 Basic Requirements
File Type Feature Sematics
.BAS   Basic source.
.LIS, .OBJ   Generated in the library directory by the COMPILE command or the BUILD DESCRIP phase.
applOBJ.OLB   Created in the library directory to store the resultant object module.
.MMS_INC   Generated in the library directory by the BUILD RULES phase.

9.5 C

Requirements for C are summarized in Table 9-10.

Table 9-10 C Requirements
File Type Feature Sematics
.C   C source.
  #dictionary Used to indicate a dependency on a CDD/Repository element. If the object is a record, its name must either start with appl_RECORDS. or start with appl and finish with _REC. If the object is a field, its name must either start with appl_FIELDS. or not finish with _REC.
  #include Used to indicate a dependency on an include (i.e. .H) source.
  extern Used with a function prototype to indicate a transitive (i.e. link time) dependency on an entry point in another module.
  main The presence of a main function indicates that this source forms the root module for an image. As a result, no dependency is generated to insert the resulting object module into the object library.
.H   C include source.
  #dictionary See C source.
  #include See C source.
  extern See C source
.TAG_CDD   Used to manage dependencies required by #dictionary statements.
.TAG_INC_1   Used to manage dependencies caused by nested #include statements.
.TAG_INC_2   Used to manage transitive dependencies caused by extern statements in #include sources.
.LIS, .OBJ   Generated in the library directory by the COMPILE command or the BUILD DESCRIP phase.
applOBJ.OLB   Created in the library directory to store the resultant object module. Note that this module is not inserted if the .C source contained a main function.
.MMS_INC   Generated in the library directory by the BUILD RULES phase.

A common practise with C programs is to have a function definition contained in a .H file which is included in both the .C source which defines the function and any .C source which uses the function. This is possible because the C language allows the presence on the extern clause even when the function is defined within s source. The following three examples illustrate such a scheme.

In fin_our_func.h would be the following code fragments:


extern int fin_our_func ( int arg_1, *char arg_2 ); 

In fin_our_func.c would be the following code fragments:


#include "fin_wrk_dir:fin_our_func.h" 
   .
   .
   .
int fin_our_func (); 
  { 
   .
   .
   .
  }; 

In fin_main_prog.c would be the following code fragments:


#include "fin_wrk_dir:fin_our_func.h" 
   .
   .
   .
main (); 
  { 
   .
   .
   .
    status = fin_our_func ( 25, some_text ); 
   .
   .
   .
  }; 

On the other hand, SysWorks analyses dependencies on a per source basis i.e. it does not analyse all the sources in an application simultaneously in order to generate the final MMS script, rather it analyses each source independently (usually only when they have been updated) and generates a corresponding MMS script, with the set of these MMS scripts being merged to form the final script. As a result of using this technique, the three examples above lead to a circular dependency between fin_our_func.c and fin_our_func.h because:

Since MMS cannot distinguish between compile time and link time dependencies or cope with co-dependencies, it treats these cases as circular dependencies and generates errors.

To solve this problem, one solution is to split the include file into two resulting in the following four examples illustrate this technique.

In fin_our_func.h would be the following code fragments:


#include "fin_wrk_dir:fin_our_func_2.h" 
   .
   .
   .
extern int fin_our_func (); 

In fin_our_func_2.h would be the following code fragments:


int fin_our_func ( int arg_1, *char arg_2 ); 

In fin_our_func.c would be the following code fragments:


#include "fin_wrk_dir:fin_our_func_2.h" 
   .
   .
   .
int fin_our_func (); 
  { 
   .
   .
   .
  }; 

In fin_main_prog.c would be the following code fragments:


#include "fin_wrk_dir:fin_our_func.h" 
   .
   .
   .
main (); 
  { 
   .
   .
   .
    status = fin_our_func ( 25, some_text ); 
   .
   .
   .
  }; 

9.6 C++

Requirements for C++ are summarized in Table 9-11.

Table 9-11 C++ Requirements
File Type Feature Sematics
.CXX   C++ source.
  #dictionary Used to indicate a dependency on a CDD/Repository element. If the object is a record, its name must either start with appl_RECORDS. or start with appl and finish with _REC. If the object is a field, its name must either start with appl_FIELDS. or not finish with _REC.
  #include Used to indicate a dependency on an include (i.e. .HXX and .IXX) source.
  extern Used with a function prototype to indicate a transitive (i.e. link time) dependency on an entry point in another module.
  main The presence of a main function indicates that this source forms the root module for an image. As a result, no dependency is generated to insert the resulting object module into the object library.
.HXX, .IXX   C++ include source.
  #dictionary See C++ source.
  #include See C++ source.
  extern See C++ source
.TAG_CDD   Used to manage dependencies required by #dictionary statements.
.TAG_INC_1   Used to manage dependencies caused by nested #include statements.
.TAG_INC_2   Used to manage transitive dependencies caused by extern statements in #include sources.
.LIS, .OBJ   Generated in the library directory by the COMPILE command or the BUILD DESCRIP phase.
applOBJ.OLB   Created in the library directory to store the resultant object module. Note that this module is not inserted if the .C source contained a main function.
.MMS_INC   Generated in the library directory by the BUILD RULES phase.


Previous Next Contents Index