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



Don't you get this when you code your display file as a template?
RNF2584
The keyword is not allowed following keyword TEMPLATE; the keyword is
ignored.
Cause . . . . . : When keyword TEMPLATE has already been specified, the
only keywords which may follow are BLOCK, EXTDESC, EXTMBR, FORMLEN,
FORMOFL, IGNORE, INCLUDE, KEYLOC, MAXDEV, PASS, PGMNAME, PLIST, PREFIX,
QUALIFIED, RENAME and SFILE.

Recovery . . . : Remove the incorrect keyword.



From: "Christen, Duane" <Duane.Christen@xxxxxxxxxx>
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Date: 01/27/2010 12:56 PM
Subject: RE: READC and *INPUT datastructure
Sent by: rpg400-l-bounces@xxxxxxxxxxxx



Darren;

What you want is LikeRec. The code snippets below demonstrate how to use
the 6.1 file template/local file/record DS capabilities, the last line is
the ReadC operation you want to use.

Define the template, in a copybook in my case:
Fdisplay_t CF E WorkStn Qualified
F Template
F ExtDesc('OTD5568')
F ExtFile('OTD5568')
F SFile(SFITEMLIST)

Use the template in a procedure to define a local file:
Fdisplay LikeFile(display_t)
F Static
F IndDs(displayInd)
F SFile(SFITEMLIST : sflRRN)
F UsrOpn

Define the I/O structure(s). (Define your indicator struct like you always
have):
D listCtl...

D DS LikeRec(display_t.scItemList :
*ALL)

D listCtlOut...

D DS LikeRec(display_t.scItemList :

D *OUTPUT)


D listSflOut...
D DS LikeRec(display_t.sfItemList :

D *OUTPUT)


D listSflIn...
D DS LikeRec(display_t.sfItemList :

D *INPUT)


ReadC Code:
ReadC display.SFITEMLIST listSflIn;

Duane Christen



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.