For 3.1 that's quite complete, 3.2 should get the single "allow without USAGE keyword" commit, but there is no ongoing development on this feature, more will only be bug-fixing for now, if anything is necessary (it is actually quite well tested).
After checking: LIKE "should work" but is not well tested - it would be good to have it documented and bug-reports (if any) on this are likely to get fixed soon; TYPEDEF STRONG is not supported yet and is unlikely to land soon if there are no patches for it.
Last edit: Simon Sobisch 2022-01-16
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can someone provide the text required for this/these features that will match up with what GC allows for and if needed the context and I will add it in under USAGE.
It needs to be precise.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Vincent,
I tried to write the documentation to insert in PG for TYPEDEF and TYPE.
Find it below let me know if it fits the needs.
This would be inserted as TYPEDEF as a new chapter 6.9.48 just after the TYPE clause.
Later I will send the one for SAME AS.
**6.9.XX TYPEDEF **
TYPEDEF Clause Syntax
[ 01 type-name-1 IS TYPEDEF ]~~~~~~~
This syntax is valid in the following sections: FILE, WORKING-STORAGE, LOCAL-STORAGE, LINKAGE
The TYPEDEF clause identifies a type declaration which creates a user-defined data type.
The TYPE clause is used to apply this user-defined data type to the description of a data item.
The TYPEDEF clause specifies that the data description entry is a type declaration.
The TYPEDEF clause can only be specified for level 01 entries, which can also be group items, and for which the data-name format of the entry-name clause is specified. If the TYPEDEF clause is specified for a data description, then that same data description must include a data-name, that is, it must not be specified with either an implicit or explicit FILLER clause.
If a group item is specified, all subordinate items of the group become part of the type declaration.
No storage is allocated for a type declaration.
These type definitions act like templates that can then be used to define new data items using the TYPE clause (see TYPE at page xxx) or that can subsequently be referenced in a USAGE clause (see USAGE at page xxx).
The new data item acquires all the characteristics of the user-defined data type.
If the user-defined data type is a group item, then the new data item has subordinate elements of the same name, description, and hierarchy as those belonging to the user-defined data type.
All of the other data description clauses, if they are specified, are assumed by any data item that is defined using the user-defined data type (within the TYPE or USAGE clause).
The following clauses cannot be specified along with TYPEDEF: EXTERNAL, GLOBAL, LIKE, OCCURS, REDEFINES.
If the TYPEDEF clause is specified for a group item, then subordinate items can be specified with OCCURS or REDEFINES clauses. TYPEDEF cannot be used with complex OCCURS DEPENDING ON. This means that you cannot specify an OCCURS DEPENDING ON clause within a table that is part of a TYPEDEF.
The VALUE clause cannot be specified either in the data descriptions specifying the TYPEDEF clause or in any subordinate item except for condition-names (88 level entries) within the TYPEDEF structure.
The TYPE clause can be specified in the same data description entry as the TYPEDEF clause but the description of the subject of the entry, including its subordinate items, shall not contain a TYPE clause that directly or indirectly references this type definition.
Into FILE SECTION a data description entry declared at level-number 1 that includes a TYPEDEF clause is not a record description entry.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Vincent,
this is the TYPE clause dicumentation.
The TYPE clause is already in the PG because it is for REPORT SECTION.
So you have to add following dcumentationa as "Format 1". The Format 2. will be the actual documentaion for REPRT SECTION TYPE.
TYPE Clause
6.9.XX TYPE
TYPE Clause Syntax
Format 1 (type-name):
[ TYPE TO type-name-1 ]
The TYPE clause indicates that the data description of the subject of the entry is specified by a user-defined data type.
The user-defined data type is defined using the TYPEDEF clause, which is described in TYPEDEF clause (see page xxx).
The following general rules apply: If type-name-1 (defined using the TYPEDEF clause) describes a group item, then the subject of the TYPE clause is a group item whose subordinate elements have the same names, descriptions, and hierarchies as the subordinate elements of type-name-1.
Since the subject of the TYPE clause may have a level number as high as 49 and type-name-1 may be a group item with 49 levels, the number of levels of this hierarchy may exceed 49. In fact, since descriptions of type-names may reference other type-names, there is no limit to the number of levels in this hierarchy.
If a VALUE clause is specified in the data description of the subject of the TYPE clause, any VALUE clause specified in the description of type-name-1 is ignored for this entry.
The scoping rules for type names are similar to the scoping rules for data names.
Reference modification is not allowed for an elementary item that is the subject of a TYPE clause.
The description of type-name-1, including its subordinate data items, cannot contain a TYPE clause that references the record to which the subject of the TYPE clause (that references type-name-1), is subordinate
For example, A is a group item defined using the TYPEDEF clause. B is also a group item defined using the TYPEDEF clause, but which also includes a subordinate item of TYPE A. This being the case, the type definition for A cannot include items of TYPE B.
The subject of a TYPE clause cannot be renamed in whole, or in part.
The subject of a TYPE clause cannot be redefined explicitly or implicitly.
If the subject of a TYPE clause is subordinate to a group item, the data description of the group item cannot contain the USAGE clause.
The TYPE clause cannot occur in a data description entry with the BLANK WHEN ZERO, FORMAT, JUSTIFIED, PICTURE, REDEFINES, RENAMES, SIGN, SYNCHRONIZED, or USAGE clause.
The TYPE clause can be specified in a data description entry with the EXTERNAL, GLOBAL, OCCURS, TYPEDEF, and VALUE clauses.
The essential characteristics of a type, which is identified by its type-name, are the relative positions and lengths of the elementary items defined in the type declaration, and the BLANK WHEN ZERO, JUSTIFIED, PICTURE, SIGN, SYNCHRONIZED, and USAGE clauses specified for each of these elementary items.
The TYPE clause shall not be specified in the same data description entry with any clauses except BASED, CLASS, CONSTANT RECORD, DEFAULT, DESTINATION, entry-name, EXTERNAL, GLOBAL, INVALID, level-number, OCCURS, PRESENT WHEN, PROPERTY, TYPEDEF, VALIDATE-STATUS, VALUE, and VARYING.
Figure 1. Example Showing How TYPEDEF and TYPE Clauses Can Be Used
at chapter 6.9.49 USAGE clause , we have to add type-names:
[ USAGE IS type-name-1 ]
~~~~~ `
The USAGE clause indicates that the data description of the subject of the entry is specified by a user-defined data type.
The user-defined data type is defined using the TYPEDEF clause, which is described in TYPEDEF clause (see page xxx).
Hi Vincent following is the SAME AS documentation .
The last part to complete this bug.
This clause I think have to be inserted as chapter 6.9.41
SAME AS clause
The SAME AS clause causes a data item to inherit the same definition of another data item.
General format
SAME AS Data-name-1.
Syntax rules
Data-name-1 is a data Item defined elsewhere in the same program.
Data-name-1 shall not be subscripted.
A data description entry that specifies the SAME AS clause shall not be immediately followed by a subordinate data description entry or level 88 entry.
Neither the description of data-name-1 nor the description of any data items subordinate to the subject of the entry shall directly or indirectly contain a SAME AS clause that references the subject of the entry or any group item to which this entry is subordinate.
The description of data-name-1, including its subordinate data items, shall not contain a TYPE clause that references the record to which this entry is subordinate.
The description of data-name-1 shall not contain an OCCURS clause. However, items subordinate to data-name-1 may contain OCCURS clauses.
Data-name-1 shall reference an elementary item or a level 1 group item described in the file, working-storage, local-storage, or linkage section.
If the subject of the entry is a level 77 item, data-name-1 shall reference an elementary item.
A group item to which the subject of the entry is subordinate shall not contain a GROUP-USAGE, SIGN, or USAGE clause.
The effect of the SAME AS clause is as though the data description identified by data-name-1 had been coded in place of the SAME AS clause, excluding the level-number, name, and the EXTERNAL, GLOBAL, REDEFINES clauses specified for data-name-1; level numbers of subordinate items may be adjusted as described in general rule 2.
If data-name-1 describes a group item:
the subject of the entry is a group whose subordinate elements have the same names, descriptions, and hierarchy as the subordinate elements of data-name-1,
the level-numbers of items subordinate to that group are adjusted, if necessary, to preserve the hierarchy of data-name-1,
level-numbers in the resulting hierarchy may exceed 49.
Every one welcome to inspect / check new PG manual.
Something is adrift though as the changed content lists at the manual start and at section 6 is not reflecting the new changed sections and I cannot find out what is causing it.
I am very weak on Tex controls -- I have looked for the obvious possibilities, but still cannot fix it.
May be time I handed this job over to someone else - as have just had my 75 birthday, may be the brain is not working as it used to.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This does not like it is yet completed.
For 3.1 that's quite complete, 3.2 should get the single "allow without USAGE keyword" commit, but there is no ongoing development on this feature, more will only be bug-fixing for now, if anything is necessary (it is actually quite well tested).
After checking:
LIKE"should work" but is not well tested - it would be good to have it documented and bug-reports (if any) on this are likely to get fixed soon;TYPEDEF STRONGis not supported yet and is unlikely to land soon if there are no patches for it.Last edit: Simon Sobisch 2022-01-16
Can someone provide the text required for this/these features that will match up with what GC allows for and if needed the context and I will add it in under USAGE.
It needs to be precise.
Hi Vincent,
I tried to write the documentation to insert in PG for TYPEDEF and TYPE.
Find it below let me know if it fits the needs.
This would be inserted as TYPEDEF as a new chapter 6.9.48 just after the TYPE clause.
Later I will send the one for SAME AS.
**6.9.XX TYPEDEF **
TYPEDEF Clause Syntax
This syntax is valid in the following sections: FILE, WORKING-STORAGE, LOCAL-STORAGE, LINKAGE
The TYPEDEF clause identifies a type declaration which creates a user-defined data type.
The TYPE clause is used to apply this user-defined data type to the description of a data item.
The TYPEDEF clause specifies that the data description entry is a type declaration.
The TYPEDEF clause can only be specified for level 01 entries, which can also be group items, and for which the data-name format of the entry-name clause is specified. If the TYPEDEF clause is specified for a data description, then that same data description must include a data-name, that is, it must not be specified with either an implicit or explicit FILLER clause.
If a group item is specified, all subordinate items of the group become part of the type declaration.
No storage is allocated for a type declaration.
These type definitions act like templates that can then be used to define new data items using the TYPE clause (see TYPE at page xxx) or that can subsequently be referenced in a USAGE clause (see USAGE at page xxx).
The new data item acquires all the characteristics of the user-defined data type.
If the user-defined data type is a group item, then the new data item has subordinate elements of the same name, description, and hierarchy as those belonging to the user-defined data type.
All of the other data description clauses, if they are specified, are assumed by any data item that is defined using the user-defined data type (within the TYPE or USAGE clause).
The following clauses cannot be specified along with TYPEDEF: EXTERNAL, GLOBAL, LIKE, OCCURS, REDEFINES.
If the TYPEDEF clause is specified for a group item, then subordinate items can be specified with OCCURS or REDEFINES clauses. TYPEDEF cannot be used with complex OCCURS DEPENDING ON. This means that you cannot specify an OCCURS DEPENDING ON clause within a table that is part of a TYPEDEF.
The VALUE clause cannot be specified either in the data descriptions specifying the TYPEDEF clause or in any subordinate item except for condition-names (88 level entries) within the TYPEDEF structure.
The TYPE clause can be specified in the same data description entry as the TYPEDEF clause but the description of the subject of the entry, including its subordinate items, shall not contain a TYPE clause that directly or indirectly references this type definition.
Into FILE SECTION a data description entry declared at level-number 1 that includes a TYPEDEF clause is not a record description entry.
Hi Vincent,
this is the TYPE clause dicumentation.
The TYPE clause is already in the PG because it is for REPORT SECTION.
So you have to add following dcumentationa as "Format 1". The Format 2. will be the actual documentaion for REPRT SECTION TYPE.
TYPE Clause
6.9.XX TYPE
TYPE Clause Syntax
Format 1 (type-name):
[ TYPE TO type-name-1 ]The TYPE clause indicates that the data description of the subject of the entry is specified by a user-defined data type.
The user-defined data type is defined using the TYPEDEF clause, which is described in TYPEDEF clause (see page xxx).
The following general rules apply: If type-name-1 (defined using the TYPEDEF clause) describes a group item, then the subject of the TYPE clause is a group item whose subordinate elements have the same names, descriptions, and hierarchies as the subordinate elements of type-name-1.
Since the subject of the TYPE clause may have a level number as high as 49 and type-name-1 may be a group item with 49 levels, the number of levels of this hierarchy may exceed 49. In fact, since descriptions of type-names may reference other type-names, there is no limit to the number of levels in this hierarchy.
If a VALUE clause is specified in the data description of the subject of the TYPE clause, any VALUE clause specified in the description of type-name-1 is ignored for this entry.
The scoping rules for type names are similar to the scoping rules for data names.
Reference modification is not allowed for an elementary item that is the subject of a TYPE clause.
The description of type-name-1, including its subordinate data items, cannot contain a TYPE clause that references the record to which the subject of the TYPE clause (that references type-name-1), is subordinate
For example, A is a group item defined using the TYPEDEF clause. B is also a group item defined using the TYPEDEF clause, but which also includes a subordinate item of TYPE A. This being the case, the type definition for A cannot include items of TYPE B.
The subject of a TYPE clause cannot be renamed in whole, or in part.
The subject of a TYPE clause cannot be redefined explicitly or implicitly.
If the subject of a TYPE clause is subordinate to a group item, the data description of the group item cannot contain the USAGE clause.
The TYPE clause cannot occur in a data description entry with the BLANK WHEN ZERO, FORMAT, JUSTIFIED, PICTURE, REDEFINES, RENAMES, SIGN, SYNCHRONIZED, or USAGE clause.
The TYPE clause can be specified in a data description entry with the EXTERNAL, GLOBAL, OCCURS, TYPEDEF, and VALUE clauses.
The essential characteristics of a type, which is identified by its type-name, are the relative positions and lengths of the elementary items defined in the type declaration, and the BLANK WHEN ZERO, JUSTIFIED, PICTURE, SIGN, SYNCHRONIZED, and USAGE clauses specified for each of these elementary items.
The TYPE clause shall not be specified in the same data description entry with any clauses except BASED, CLASS, CONSTANT RECORD, DEFAULT, DESTINATION, entry-name, EXTERNAL, GLOBAL, INVALID, level-number, OCCURS, PRESENT WHEN, PROPERTY, TYPEDEF, VALIDATE-STATUS, VALUE, and VARYING.
Figure 1. Example Showing How TYPEDEF and TYPE Clauses Can Be Used
Figure 2. Example Showing How TYPEDEF and TYPE Clauses Can Be Used
Also it needs to be modified from NO to YES for TYPEDEF the programmers Guide see screenshot
Done.
at chapter 6.9.49 USAGE clause , we have to add type-names:
[ USAGE IS type-name-1 ]The USAGE clause indicates that the data description of the subject of the entry is specified by a user-defined data type.
The user-defined data type is defined using the TYPEDEF clause, which is described in TYPEDEF clause (see page xxx).
Example 1.
which would be interpreted as if it had been coded as:
Example 2.
Example 3.
Hi Vincent following is the SAME AS documentation .
The last part to complete this bug.
This clause I think have to be inserted as chapter 6.9.41
SAME AS clause
The SAME AS clause causes a data item to inherit the same definition of another data item.
General format
SAME AS Data-name-1.Syntax rules
Data-name-1 is a data Item defined elsewhere in the same program.
Data-name-1 shall not be subscripted.
A data description entry that specifies the SAME AS clause shall not be immediately followed by a subordinate data description entry or level 88 entry.
Neither the description of data-name-1 nor the description of any data items subordinate to the subject of the entry shall directly or indirectly contain a SAME AS clause that references the subject of the entry or any group item to which this entry is subordinate.
The description of data-name-1, including its subordinate data items, shall not contain a TYPE clause that references the record to which this entry is subordinate.
The description of data-name-1 shall not contain an OCCURS clause. However, items subordinate to data-name-1 may contain OCCURS clauses.
Data-name-1 shall reference an elementary item or a level 1 group item described in the file, working-storage, local-storage, or linkage section.
If the subject of the entry is a level 77 item, data-name-1 shall reference an elementary item.
A group item to which the subject of the entry is subordinate shall not contain a GROUP-USAGE, SIGN, or USAGE clause.
The effect of the SAME AS clause is as though the data description identified by data-name-1 had been coded in place of the SAME AS clause, excluding the level-number, name, and the EXTERNAL, GLOBAL, REDEFINES clauses specified for data-name-1; level numbers of subordinate items may be adjusted as described in general rule 2.
If data-name-1 describes a group item:
Example of SAME AS usage.
Done [r4636]
Related
Commit: [r4636]
Last edit: Simon Sobisch 2022-06-26
Big thanks to @dilodilo to take care and for @vcoen to check, adjust and commit!
Every one welcome to inspect / check new PG manual.
Something is adrift though as the changed content lists at the manual start and at section 6 is not reflecting the new changed sections and I cannot find out what is causing it.
I am very weak on Tex controls -- I have looked for the obvious possibilities, but still cannot fix it.
May be time I handed this job over to someone else - as have just had my 75 birthday, may be the brain is not working as it used to.