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



Just so you know - the 3 columns in a source PF are SRCSEQ, SRCDAT, and SRCDTA - that is, sequence number, date, and data.

You'll need to understand these kinds of details so as not to have unexpected issues, methinks.

SRCDAT (historically) is the date when that line was last changed (6-digit MDY maybe, maybe YMD) - more recent version control systems use diffs, I believe, to handle when things changed.

SRCSEQ is the SEU line number - not necessarily unique, often re-ordered in tools like SEU and RDi.

There are no stored procedures, generally, for CL commands - I suggest using an SQL call of QCMDEXC

CALL QCMDEXC ('ADDPFM', some-number-that-is-the-text-length-of-the-command-in-first-parameter)

If you have some way to make that into a snippet, perhaps promptable, well, there you go.

Remember, all IBM i programs can be considered to be stored procedures. Therefore, they can be called from an SQL environment.

On 10/23/2015 3:34 PM, Justin Dearing wrote:
I discovered that SELECT * FROM QSQLSRC gives me a rowid, what looks like a
SEU line number, and a row of text, but no way to tie a line of source code
to a source member. Is there another stored procedure for that? Is there a
stored procedure for ADDPFM? I'm thinking I'm going to write a stored
procedure that does the GENERATE_SQL, ADDPFM, etc so I can write DDL in sql
workbench, but have it stored where the greenscreeners like it.

I've also discovered that *STATEMENT_FORMATTING_OPTION* is not intended to
be mixed with storing the results in a source member, unless I want to
light up SEU.It seems that's more intended for storing jdbc/odbc/etc output
of GENERATE_SQL this as a "stream file." I'm going to submit a comment to
clarify that in the notes.

Also, although it seems obvious in retrospect, I'm going to suggest that
the *ADDITIONAL_INDEX_OPTION *docs explicitly state that this will not
script out the "CREATE INDEX" statements associated with this view. I could
use the catalog views to determine what indexes go with a table, and script
them separately though.

Justin


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.