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



I've encountered similar problems, but we resolved it by doing the
reverse, of O-ALL to S-ALL.

Try this.

A CODEV I SST(DOCODE 1 2)
A K RRAKCN
A K RRAKYR
A K RRAKTY
A K RRAKNO
A O STATUS COMP(EQ 'X')
A O CODEV COMP(NE 'EV')
A S ALL


David L. Mosley, Jr.
Technical Solutions Architect | 919.379.3730
Dancik International | www.dancik.com
www.facebook.com/dancikinternational



"Shannon ODonnell" <sodonnell@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
02/23/2012 06:17 PM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>


To
"'RPG programming on the IBM i / System i'" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
RE: SST In Logical FIle with Select






Did not work.

Here's the actual code. It's still pulling in everything, not just where
my
CODEV (derived field) = 'EV'


A CODEV I SST(DOCODE 1 2)
A K RRAKCN
A K RRAKYR
A K RRAKTY
A K RRAKNO
A S STATUS COMP(NE 'X')
A S CODEV COMP(EQ 'EV')
A O ALL


I can always do an OPNQRYF or embedded SQL, but I really needed the index
path to have already existed for the application so it doesn't have to add
any overhead each time it's used.




-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Shannon ODonnell
Sent: Thursday, February 23, 2012 4:22 PM
To: 'RPG programming on the IBM i / System i'
Subject: RE: SST In Logical FIle with Select

Ah...you did an Omit ALL. Does that mean you exclude all records then
that do not match 'TOOL'?

I did not remember that technique at all but I'll try it right now and let
you know. The file has several million records in it so it takes about
40
minutes to build the path.

Thanks!

Shannon O'Donnell

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Nick_Radich@xxxxxxxxxxxxxx
Sent: Thursday, February 23, 2012 4:18 PM
To: RPG programming on the IBM i / System i
Subject: Re: SST In Logical FIle with Select

Hi Shannon,

Here is the layout for a LF that we have, and it has been working for
years.


A R ITEMASEA PFILE(ITEMASA)
A*
A MOLD I SST(ITNBR 2 4)
a TEXT('Mold')
a COLHDG('Mold')
A ITNBR
A RECID
A INVFG
A LOLEV
A NOSLC
A NOPWU
A NODET
A NOROP
A RACNO
A FOTAB
A ITDSC
A*
A* KEY FIELD
A*
A K MOLD
A K ITNBR
A* Selection
A S ITCLS COMP(NE 'TOOL')
A O ALL
A*

HTH

Thanx,

Nick



Nick Radich
Sr. Programmer/Analyst
EPC Molding, Inc.
Direct (320) 679-6683
Toll free (800) 388-2155 ext. 6683
Fax (320) 679-4516
nick_radich@xxxxxxxxxxxxxx



From: "Shannon ODonnell" <sodonnell@xxxxxxxxxxxxxxxxxxxxxxxxx>
To: <rpg400-l@xxxxxxxxxxxx>
Date: 02/23/2012 04:04 PM
Subject: SST In Logical FIle with Select
Sent by: rpg400-l-bounces@xxxxxxxxxxxx



Hi,



It's been a really long time since I needed to do this and my skills are
rusty. I could use some knowledgeable help!



I have physical file that contains a something like 10 fields in it. In
one field, that is 6 characters long, I need to check the first two
characters of that field and then only include records where the first two
characters contain a specific value.



I thought I could use the SST and then a Select in the logical but it's
not
working. Instead I am getting all the records in that file, not just the
ones with the derived field containing a specific value.



This is my source and it doesn't work.



Physical File named File1:



R RFILE

FIELD1 1a

FIELD2 2a

FIELD3 3a

FIELD4 4a

FIELD5 5a

FIELD6 6a

FIELD7 7a

FIELD8 8a

FIELD9 9a

FIELD10 10a

K FIELD1

K FIELD2







Logical file:



R RFILE PFILE(FILE1)

FIELD1

FIELD2

FIELD6

FIELD8

FIELD10



DRVFLD I SST(FIELD6 1 2)



K FIELD1

K FIELD10

S DRVFLD COMP(EQ 'EV')







How do I code the logical so that it only pulls records where the derived
field DRVFLD = 'EV'?



Thanks!



Shannon O'Donnell





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


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

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

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.