RPGIV @ Work

A unique site for RPG and System i Lovers


Hi, this site will provide all what you need in System i and RPG developments.

My Name is Chamara Withanachchi, System i Expert and RPG Developer. And in the field for last 11 years.

I hope you will find lot of valuable information from this site

Blog - Content Section Layout
User Rating: / 0
Written by Chamara Withanachchi   


Keyword LIKEREC is used to define a data structure, data structure subfield, prototyped return value, or prototyped parameter like a record. The subfields of the data structure will be identical to the fields in the record. LIKEREC can take an optional second parameter which indicates which fields of the record to include in the data structure. These include:

  • *ALL All fields in the external record are extracted.
  • *INPUT All input-capable fields are extracted. (This is the default.)
  • *OUTPUT All output-capable fields are extracted.
  • *KEY The key fields are extracted in the order that the keys are defined on the K specification in the DDS.

The following should be taken into account when using the LIKEREC keyword:

  • The first parameter for keyword LIKEREC is a record name in the program. If the record name has been renamed, it is the internal name for the record.
  • The second parameter for LIKEREC must match the definition of the associated record of the file on the system. *INPUT is only allowed for input and update capable records; *OUTPUT is only allowed for output capable records; *ALL is allowed for any type of record; and *KEY is only allowed for keyed files. If not specified, the parameter defaults to *INPUT.
  • For *INPUT and *OUTPUT, subfields included in the data structure occupy the same start positions as in the external record description.
  • If a prefix was specified for the file, the specified prefix is applied to the names of the subfields.
  • Even if a field in the record is explicitly renamed on an input specification the external name (possibly prefixed) is used, not the internal name.
  • If the file is defined with the ALIAS keyword, the alias names will be used for the subfields of the data structure.
  • A data structure defined with LIKEREC is a QUALIFIED data structure. The names of the subfields will be qualified with the new data structure name, DS1.SUBF1.
  • LIKEREC can be coded for subfields of a qualified data structure. When LIKEREC is coded on a data structure subfield definition, the subfield data structure is automatically defined as QUALIFIED. Subfields in a LIKEREC subfield data structure are referenced in fully qualified form: "ds.subf.subfa". Subfields defined with LIKEREC are themselves data structures, and can be used wherever a data structure is required.
GO Nets
User Rating: / 0
Written by Chamara Withanachchi   

The GO NETS tool was written to provide a command interface to fill this need. It provides command interfaces to the i5/OS NetServer APIs, and a menu over the commands.

Before the tool can be used, it must be created. Follow the instructions in the next section to build the tool set on your machine. GO NETS is a user tool and is shipped in the QUSRTOOL library, under license program 5722SS1 option 7, starting in V5R2. For more information on this tool and how to use it, please see the documentation file QUSRTOOL/QATTINFO, member TZLSINFO.

Setting up GO NETS

Follow these example steps to build the GO NETS command tool into library NETSRVCMD.

  1. Create the target library. NETSRVCMD may be replaced with the library name of your choice.
    CRTLIB LIB(NETSRVCMD) TEXT('i5/OS NetServer menu and commands')
  2. Expand the necessary files:
  3. Create the installation program:
  4. Call the installer to create the GO NETS tool:
  5. Add the new library to the library list:
  6. Run the tool's menu interface. From now on, you need only type this command to bring up GO NETS function.
CPF6301 Compiler Error
User Rating: / 0
Written by Chamara Withanachchi   

This happens when an internal limit in the PRM (Program Resolution Monitor) is reached. This limit restricts the number of objects (ODT entries) which can be defined in a program; such objects include variables and constants declared in the program, as well as any objects declared by the compiler for its own use. The maximum number of ODT entries is 32767 (in simple terms Large Program).

What is ODT –

This is the number of program objects declared by the compiler. Program objects include variables, constants, labels, operand lists, and exception descriptions. Typically, one or more ODT entries are used for each variable, constant, and label in your program.

To overcome this Convert this program to RPGLE

Level Checks
User Rating: / 0
Written by Chamara Withanachchi   

When a database file is opened, the system can check whether the file definition is changed. The LVLCHK parameter specifies the check for record format description changes.

When the file changes to an extent that your program might not be able to process the file, the system notifies your program. The default is to do level checking.

Simple Example

Assume that you compiled your program two months ago. At that time, the file was defined as having three fields in each record. Last week another programmer decided to add a field to the record format, so now each record has four fields. When your program tries to open the file, the system notifies your program that a significant change has occurred to the file definition since the last time the program was compiled. This notification is known as a record format level check.

Changes to any other DDS information have no effect on the record format level identifier and can be changed without having to specify LVLCHK(*NO) or recompiling the programs that use the file.

For example, the following DDS keywords can be changed without causing a level check: TEXT, COLHDG, CHECK, EDTCDE, EDTWRD, REF, REFFLD, CMP, RANGE, VALUES, TRNTBL, REFSHIFT and DFT. Join specifications, join keywords and access path keywords can be changed. You can even change the key fields and select/omit fields without causing a level check.

SIFT-IT Free Edition (QAUDJRN monitoring software for the IBM i, System i, iSeries, AS/400)
User Rating: / 1
Written by Chamara Withanachchi   

SIFT-IT Free Edition is a free software tool for the IBM i that can help you manage system and security events by monitoring logs in QAUDJRN in real-time. SIFT-IT Free Edition allows you to define a specific event and upon the occurrence of the event you can send messages to syslog servers and/or alerts to system administrators and users. The latest release of SIFT-IT Free Edition includes many new features and tools for testing and diagnostics.

Click here to download your FREE COPY of SIFT-ITWrite Comment (0 comments)
<< Start < Previous 1 2 3 4 5 6 7 8 9 10 Next > End >>

Results 41 - 50 of 626