


Non-DDS files actually has a filename for the whole record. Find your file's fieldname using this command, which uses query/400:
runqry *n mylib/myfile
The fieldname to use in your query will be the heading-name (propably F00001..).
Now create your query making a resultfield : enter a resultfieldname, fx COMPCOD, and enter this expression
substr(F00001, 925, 3)
Then enter some selection in your query, and VOILA.... :-)
I hope thisworks for you
DanF
I’m not sure if query will work with a file that long
However, you would make a result field using substr to get the company
Then use the result field in the select record option.
But you say Company Code ’01′ which is the 925-927 — 925-927 is three characters wide?
Phil


Thank you. The Company Code is ’001′. But who to create substring if there no fields names?
Thank you Dan, it worked and It is so simple…
Look to see if the file contains a System 36 IDDU (Interactive Data Definition Utility) layout. If so then link the file using this utility and suddently you have a file layout. If you do not have a layout then make one using this utility and link the file and now you have the file layout that can be used for more than one field of information.
As well IDDU allows you to have multiple layouts for a file.
…System 36 IDDU (Interactive Data Definition Utility)…
For those unfamiliar, the STRIDD command can give you initial access to IDDU. There are some interesting effects that are possible, though expertise is dwindling.
Tom