Shannon,
I'm at a loss because the method you used to code the SST( and Select is
exactly what I have used, and it "seemed" to work.  I.e., I never
noticed/found a problem.
My only suggestion is that you re-evaluate the result of the CRTLF.  
Jerry C. Adams
IBM i Programmer/Analyst
There are only so many ulcers in the world, and I make certain that other
people get them. -George Steinbrenner
--
A&K Wholesale
Murfreesboro, TN
615-867-5070
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Shannon ODonnell
Sent: Thursday, February 23, 2012 4:04 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: SST In Logical FIle with Select
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.
As an Amazon Associate we earn from qualifying purchases.