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



Darren;

Let me know if you have any more problems with local files I can post some code that may help.

I had a lot of fun getting local files to work (mostly a documentation to keyboard interface problem) but it is really cool using it with display files IMO.

Duane Christen


--


Duane Christen
Senior Software Engineer
(319) 790-7162
Duane.Christen@xxxxxxxxxx

Visit PAETEC.COM


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of darren@xxxxxxxxx
Sent: Wednesday, January 27, 2010 2:59 PM
To: RPG programming on the IBM i / System i
Subject: RE: READC and *INPUT datastructure

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


--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.


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.