ESTIMADO REVISE ESTO.
Abstract This document explains why the program fails with error messages
RNQ0103 and MCH1210.
Document Description: The following program recreates the error:
PF5:*************** Beginning of data ************* R FMT5
FLD1 10
JOB# 6 0 K FLD1
K JOB# ****************** End of data
****************RPGLE: *************** Beginning of data
*********************** fpf5 if e k disk
d j# s 10 0 inz(1111111) /free
chain (fld1:j#) fmt5;
/end-free c
eval *inlr = *on ****************** End of data
**************************
If the program is modified so that the value of j# will fit into a 6,0 field
(for example inz(1111)) as it is defined in the file, the program will work
without error. The problem with the above example is that the compiler does
not check that the field lengths match for the syntax of the key field. This
will work as long as the data will fit into the field in the file. This is
documented in the IBM eServer iSeries WebSphere® Development Studio ILE RPG
Reference, SC09-2508-04 (Version 5), Chapter 20 in the section entitled Keys
for File Operations. The documentation reads as follows:
With the file operations CHAIN, DELETE, READE, READPE, SETGT and SETLL, the
search argument, search-arg, must be the key or relative record number used to
identify the record. For free-form calculations, a search argument may be:1 A
single field name2 A klist name3 A list of values, such as "(a:b:c+2)". Each
part of the composite key may be any expression. Data types must match the
corresponding key field, but lengths and data format do not have to match.4
%KDS(ds{:num}) A composite key is formed from the subfields of the specified
data structure in turn. Data types must match with the corresponding key field,
but lengths and data format do not have to match. Rules for moving data from
expression values to the key build area are the same as for operations code
EVAL in that shorter search arguments are padded on the right with blanks and
longer search arguments are truncated for type character. If num is specified,
that is the number of subfields to use in the composite key. For non-free-form
calculations, only field names and klist names are allowed as search argument
_________________________________________________________________
¡Este Otoño reta a tus amigos con el nuevo juego de preguntas LiveQuiz!
http://www.vivelive.com/LiveQuiz/
__________________________________________________
Forum.HELP400 es un servicio más de NEWS/400.
© Publicaciones Help400, S.L. - Todos los derechos reservados
http://www.help400.es
_____________________________________________________
Para darte de baja visita la siguente URL:
http://listas.combios.es/mailman/listinfo/forum.help400