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

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

--


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: Tuesday, January 26, 2010 2:14 PM
To: midrange-RPG RPG message board
Subject: READC and *INPUT datastructure


How do you use READC correctly with a DS?

I've been using data structures more with my RPG I/O commands. I'm a little stumped by READC though. The manual says that the data structure used in a READC must be defined with *INPUT, which means only input capable fields are defined. In many of my subfile programs, the action field is the only input capable field available. So if the user puts a 2 on the second record subfile record, you get a '2' back in the READC, but nothing else.

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