I have a file with a 15 lenght alpha-numerick Key field.
The first 2 characters are the sales territory for which there are numerous
combinations. I want to chain to this file ignoring the first 2 characters
of the key field but usign the other 13 characters. Can this be done with
creating a new logical file or without using a complex loop and conc.
Paul
For example, let us assume that the original, key field is called CHAR15.
You could define a logical file field as...
A CHAR13 SST(CHAR15 3 13)
A*----------------------------------------------------------------
A* Key fields
A K CHAR13
Paul Delahunty <v-pa...@microsoft.com> wrote in article
<68t1rr$8...@news.microsoft.com>...
Build a new logical file! Add a new field and use the SST (substring) to
section off a piece of the original field.
Then set a Key on this new field!
Alternatively, use a Program described file!
Regards
Paul V Cullen
>Hi,
>
>I have a file with a 15 lenght alpha-numerick Key field.
>
>The first 2 characters are the sales territory for which there are numerous
>combinations. I want to chain to this file ignoring the first 2 characters
>of the key field but usign the other 13 characters. Can this be done with
>creating a new logical file or without using a complex loop and conc.
>
>Paul
>
>
I would say normalize your files first.
Bradley V. Stone
bvs...@usa.net
http://prairie.lakes.com/~bvstone/
1992 Yamaha FJ1200
1969 Suzuki T250
"I was on fire... and I was dry!"
You could create a view over this file, defining only the items you want to
see.
Paul Delahunty wrote in message <68t1rr$8...@news.microsoft.com>...
Rick Williams wrote:
>
> Yes, you can accomplish this by creating a logical file. In the logical
> file DDS, create a field by substringing the alphanumeric field starting at
> position 3.
>
> For example, let us assume that the original, key field is called CHAR15.
> You could define a logical file field as...
>
> A CHAR13 SST(CHAR15 3 13)
> A*----------------------------------------------------------------
> A* Key fields
> A K CHAR13
>
> Paul Delahunty <v-pa...@microsoft.com> wrote in article
> <68t1rr$8...@news.microsoft.com>...
> > Hi,
> >
> > I have a file with a 15 lenght alpha-numerick Key field.
> >
> > The first 2 characters are the sales territory for which there are
> numerous
> > combinations. I want to chain to this file ignoring the first 2
> characters
> > of the key field but usign the other 13 characters. Can this be done with
> > creating a new logical file or without using a complex loop and conc.
> >
> > Paul
> >
> >
> >
> >
--
Francis Lapeyre flap...@communique.net
____________________________________________________________
| |
| "The probability of life originating from accident is |
| comparable to the probability of the Unabridged Dictionary |
| resulting from an explosion in a printing factory." |
| |
| --Prof. Edwin Conklin |
|____________________________________________________________|
****** Unsolicited commercial e-mail is not tolerated here. *******
****** Senders of such mail do so at their own peril. *******
****** A copy, complete with header, is forwarded to the *******
****** originating ISP for action. *******
Opinions are my own. Otherwise, they are someone else's.
hows how to specify the SST keyword on a simple or multiple format
logical file.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
A R REC1 PFILE(PFA)
A LASTNAME I SST(NAME 10 10)
A K LASTNAME
A
Figure 2-73. Specifying the SST Keyword on a Simple or Multiple Format
Logical File
The LASTNAME field is a substring of NAME from PFA. The usage I in
position 38 must be specified for SST fields in simple or multiple format
logical files.
Hope that helps and you run into better designed files!
In article <68t1rr$8...@news.microsoft.com>,
"Paul Delahunty" <v-pa...@microsoft.com> wrote:
>
> Hi,
>
> I have a file with a 15 lenght alpha-numerick Key field.
>
> The first 2 characters are the sales territory for which there are numerous
> combinations. I want to chain to this file ignoring the first 2 characters
> of the key field but usign the other 13 characters. Can this be done with
> creating a new logical file or without using a complex loop and conc.
>
> Paul
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
Paul Delahunty wrote in message <68t1rr$8...@news.microsoft.com>...