× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I've never used the keyword before but you made me curious, so I looked
it up. LikeRec has a few more features than ExtName. For one thing, it
has to be a record format already used in the program. Therefore, if
you have a prefix assigned to a file in your fspec, that prefix carries
to the LikeRec DS as well. Here's a snip-it from IBM's manual:



LIKEREC(intrecname{:*ALL|*INPUT|*OUTPUT |*KEY})

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 or file. *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.

* 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.












As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.