Wednesday, August 9, 2017

H Spec in RPGLE


ACTGRP(*NEW | *CALLER | ’activation-group-name’) The ACTGRP keyword allows you to specify the activation group the program is associated with when it is called.

ALTSEQ{(*NONE | *SRC | *EXT)} The ALTSEQ keyword indicates whether an alternate collating sequence is used, if so, whether it is internal or external to the source.

ALWNULL(*NO | *INPUTONLY | *USRCTL) The ALWNULL keyword specifies how you will use records containing null-capable fields from externally described database files.

If ALWNULL(*NO) is specified, then you cannot process records with null-value fields from externally described files.

If ALWNULL(*INPUTONLY) is specified, then you can successfully read records with null-capable fields containing null values from externally described input-only database files.

If ALWNULL(*USRCTL) is specified, then you can read, write, and update records with null values from externally described database files.

AUT(*LIBRCRTAUT | *ALL | *CHANGE | *USE | *EXCLUDE | ’authorization-list-name’) The AUT keyword specifies the authority given to users who do not have specific authority to the object, who are not on the authorization list, and whose user group has no specific authority to the object. The authority can be altered for all users or for specified users after the object is created with the CL commands Grant Object Authority (GRTOBJAUT) or Revoke Object Authority (RVKOBJAUT).

BNDDIR(’binding-directory-name’ {:’binding-directory-name’...}) The BNDDIR keyword specifies the list of binding directories that are used in symbol resolution.


CCSID(*GRAPH : parameter | *UCS2 : number | *CHAR : *JOBRUN) CCSID(*GRAPH) and CCSID(*UCS2) set the default graphic (*GRAPH) and UCS-2 (*UCS2) CCSIDs for the module. These defaults are used for literals, compile-time data, program-described input and output fields, and data definitions that do not have the CCSID keyword coded.

COPYNEST(number) The COPYNEST keyword specifies the maximum depth to which nesting can occur for /COPY directives. The depth must be greater than or equal to 1 and less than or equal to 2048. The default depth is 32.

COPYRIGHT(’copyright string’) The COPYRIGHT keyword provides copyright information that can be seen using the DSPMOD, DSPPGM, or DSPSRVPGM commands.

CURSYM(’sym’) The CURSYM keyword specifies a character used as a currency symbol in editing. The symbol must be a single character enclosed in quotes.

CVTOPT(*{NO}DATETIME *{NO}GRAPHIC *{NO}VARCHAR *{NO}VARGRAPHIC) The CVTOPT keyword is used to determine how the ILE RPG compiler handles date, time, timestamp, graphic data types, and variable-length data types that are retrieved from externally described database files.

DATEDIT(fmt{separator}) The DATEDIT keyword specifies the format of numeric fields when using the Y edit code. The separator character is optional. The value (fmt) can be *DMY, *MDY, or *YMD. The default separator is /. A separator character of & (ampersand) may be used to specify a blank separator.


DATFMT(fmt{separator}) The DATFMT keyword specifies the internal date format for date literals and the default internal format for date fields within the program. You can specify a different internal date format for a particular field by specifying the format with the DATFMT keyword on the definition specification for that field.

DEBUG{(*NO | *YES)}

The DEBUG keyword determines

1) whether DUMP operations are performed

2) whether unused externally described input fields are moved from the buffer during input operations.

DUMP operations are performed if either DEBUG or DEBUG(*YES) is specified.

If DEBUG or DEBUG(*YES) is specified, all externally described input fields will be entered even if they are not used in the program.


DECEDIT(*JOBRUN | ’value’)

The DECEDIT keyword specifies the character used as the decimal point for edited decimal numbers and whether or not leading zeros are printed.


DECPREC(30|31|63)

Keyword DECPREC is used to specify the decimal precision of decimal (packed, zoned, or binary) intermediate values in arithmetic operations in expressions. Decimal intermediate values are always maintained in the proper precision, but this keyword affects how decimal expressions are presented when used in %EDITC, %EDITW, %CHAR, %LEN, and %DECPOS.


DFTACTGRP(*YES | *NO)


The DFTACTGRP keyword specifies the activation group in which the created program will run when it is called. If *YES is specified, then this program will always run in the default activation group, which is the activation group where all original program model (OPM) programs are run. This allows ILE RPG programs to behave like OPM RPG programs in the areas of file sharing, file scoping, RCLRSC, and handling of unmonitored exceptions. ILE static binding is not available when a program is created with DFTACTGRP(*YES). This means that you cannot use the BNDDIR or ACTGRP command parameters or keywords when creating this program. In addition, any call operation in your source must call a program and not a procedure. DFTACTGRP(*YES) is useful when attempting to move an application on a program-by-program basis to ILE RPG.


If *NO is specified, then the program is associated with the activation group specified by the ACTGRP command parameter or keyword and static binding is allowed. DFTACTGRP(*NO) is useful when you intend to take advantage of ILE concepts; for example, running in a named activation group or binding to a service program. If the DFTACTGRP keyword is not specified, then the value specified on the command is used. The DFTACTGRP keyword is valid only if the CRTBNDRPG command is used.

DFTNAME(rpg_name)

The DFTNAME keyword specifies a default program or module name. When *CTLSPEC is specified on the create command, the rpg_name is used as the program or module name. If rpg_name is not specified, then the default name is RPGPGM or RPGMOD for a program or module respectively.

ENBPFRCOL(*PEP | *ENTRYEXIT | *FULL)


The ENBPFRCOL keyword specifies whether performance collection is enabled. If *PEP is specified, then performance statistics are gathered on the entry and exit of the program-entry procedure only. This applies to the actual program-entry procedure for an object, not to the main procedure of the object within the object. If *ENTRYEXIT is specified, then performance statistics are gathered on the entry and exit of all procedures of the object. If *FULL is specified, then performance statistics are gathered on entry and exit of all procedures. Also, statistics are gathered before and after each call to an external procedure.

If the ENBPFRCOL keyword is not specified, then the value specified on the command is used.



3 comments:

  1. I need help formatting the DECEDIT(*JOBRUN | ’value’) to convert decimal indicators from dot to decimal. My H SPEC will take H DECEDIT(*JOBRUN) The H SPEC... H DECEDIT(*JOBRUN | ',') renders error "A right parenthesis is expected but is not found." when I press Enter.

    ReplyDelete
    Replies
    1. H DECEDIT(*JOBRUN) in the header, then specify an editcode to your field
      for example: price = %editc(curPrice:'J')

      Delete