HP3000-L Archives

January 2003, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Roy Brown <[log in to unmask]>
Reply To:
Roy Brown <[log in to unmask]>
Date:
Mon, 27 Jan 2003 15:34:13 -0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (106 lines)
F. Alfredo Rego wrote:

> Dear Vamsi (or should I say "Dear Sudha"?)

>>  I am using RPG2 and when I perform a CHAIN operation on the Dataset
>>  the error shows up.

> Do you have any idea regarding what "ATAL" is?


An error message missing its leading 'F', at a guess.

Less dramatic perhaps, that when we had a report about the 'laughterline' that
turned out to be missing its leading 'S'.
And so put a very different complexion on the matter...

> Hopefully, somebody else from hp3000-L will be able to shed more light.

RPG hides a lot of the nuts and bolts from you (in return for you filling in a
sheetful of rather random-looking parameters)

So Vamsi Sudha is not using Image intrinsics at all, and mentioning DBGET may
be confusing.

Also, CHAIN *is* what you use - it's an RPG construct rather than an Image
one.

The RPG/iX manual says:

CHAIN

This operation reads a record from a KSAM, TurboIMAGE, or MPE direct-access
file.

CHAIN lets you retrieve records randomly; you enter identifying information
for the record
you want to read. Similarly, you can use CHAIN to write records randomly to
these files.
There are two ways to access records with CHAIN. You can access a file by
relative record
number or record key. A relative record number is a record number that is
"relative" to the
 first record in the file. For example, record 5 is the fifth physical record
in a file.

For KSAM and TurboIMAGE files, you can access records by entering a record's
key value.
For example, to access the record having a key value of 06355, enter the
number 06355.
You can calculate the record number or key value in the program or you can get
it from
records in other input files.

You must define the file that you're chaining to with a D (direct-access), I
or X (KSAM),
or M (TurboIMAGE) in the File Organization Field (column 32) of the File
Description
Specification. Enter C (chained) in the File Designation/Additional I/O Area
(column 32)
of that specification and if this is an output file, enter O in the File Type
Field (column
15). When you chain successfully to a file, the record-identifying indicators
(entered in the
Record Indicator/Look-Ahead/Trailer/Data Structure Field (columns 19-20) of
the Input
Specification) for the file remain ON throughout the cycle. If you chain to
the same output
 file more than once in the same cycle, only the last record is updated unless
you use exception
lines with each CHAIN operation.

To condition this operation, enter indicators in the Control Level (columns
7-8) or the
Indicators Field (columns 9-17), or both.

So have you set the M and C specs correctly? (And if you've set the O, how
about taking it off?)

If not, it's trying to do a KSAM or Serial read, not an Image one.
(RPG, told it's Image, will sort out the DBFIND/DBGET calls to 'really' make,
but that's all under the hood).

The manual goes on:

Enter a relative record number or record key in the Factor 1 Field. If reading
by record
number or packed record key, use a numeric literal or field. If reading by
record key, use an
alphanumeric literal, field, array, or table.

Have you set the Key correctly? A common 'gotcha' here is when reading an
all-digit non-packed key to specify a numeric field or literal, which makes
RPG think you are looking for a relative record search. So ensure you are
using an alphanumeric field, even if the key is all digits.

If you are still stuck, I can offer you some on-shore consultancy to help
resolve it.... :-)

--
Roy Brown
Posting with the OEnemy, tamed by OE-QuoteFix 1.18.3
http://jump.to/oe-quotefix

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2