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


  • Subject: Re: Finding internally described physical files
  • From: "Joep Beckeringh" <joep@xxxxxxxxxxxxxxxxxxx>
  • Date: Fri, 19 Jan 2001 23:33:49 +0100

Jim,

What you are looking for are all the lines with 'F' in position 6 and 'F' in
another position (I think it is 18).  Sadly, FNDSTRPDM (or option 25 in PDM)
does not support these sort of multiple conditions.  What I do in cases like
this is this:

1. Choose option 25 for the source file
2. Search for 'F' from position 6 to 6; choose 'List records' 'Y'es and
submit to batch
3. When the job is finished, start SEU for a new text member (e.g. in
QTXTSRC)
4. Through F15 copy your spool file in
5. Save and exit

Now you have a text member with all your file specifications and a lot of
blah blah.  Time to remove the blah blah:
6. Enter: OVRDBF FILE(whatever) TOFILE(yourlib/QTXTSRC) MBR(yourmember)
7. Start SQL
8. Enter: select srcdta from whatever (this is just safety; have to be sure
you are looking at the right member)
9. Enter: delete from whatever where substr(srcdta, 1, 6) <> 'Member' and
substr(srcdta, 15, 1) <> 'F' (position 15 is from memory; check actual
position in step 8)

Now you have a text member with all your file specifications and a line with
the member name.  Time to remove the externally defined files:
10. Enter: delete from whatever where substr(srcdta, 1, 6) <> 'Member' and
substr(srcdta, 27, 1) <> 'F' (again, position 27 is from memory; check
actual position in step 8)

Now you have a text member with all your internally described files.

It may seem somewhat complicated at first, but once you get used to the
technique it can be quite useful (why don't we have GREP?).

Joep Beckeringh


+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.