No SEU? Use SQL!

Learn how to use interactive SQL to update source member records.

You Can View User Feedback To This Tip

Sometimes you just HAVE to edit a source member, but the machine does not have SEU installed, nor is Operations Navigator available. It happened to me today, and I was desperate.

WAIT! Isn't every, virtually every file on the 400 part of the DB2 database? Sure enough, you can use interactive SQL to update source member records.

1. Make a copy of the member first just in case you mess something up:
CPYF FROMFILE(APP43/QSQLSRC) TOFILE(APP43/QSQLSRC) FROMMBR(L43S2)
TOMBR(L43S2_SAVE) MBROPT(*ADD)

2. Choose the source member you want to update by overriding the file:
OVRDBF FILE(QSQLSRC) TOFILE(APP43/QSQLSRC) MBR(L43S2)

3. Determine the source statement that you want to modify using SQL to display the member and note its SRCSEQ number:
SELECT * FROM QSQLSRC

3. Make sure you have the right record number before you try to make the change:
SELECT * FROM QSQLSRC WHERE SRCSEQ=0046.00

4. Then do the update:
UPDATE QSQLSRC SET SRCDTA='CREATE INDEX XAK1PROP_HDR ON PROP_HDR'

5. Exit SQL and use Display Physical file Member to be sure the change was what you wanted:
DSPPFM FILE(APP43/QSQLSRC) MBR(L43S2)

It would be very tedious to make more than a few changes this way, but when you really need, and 5769-ST1 is installed, it can save your day!

USER FEEDBACK TO THIS TIP

  • Sounds good to edit source member using SQL, but an easier way would be to use DBU (of course, if you have DBU utility) Eg. DBU &lib/@srcfile then select the &MBR you want to edit and using the CHANGE mode, you can modify the code, For a more broader view, do a "F21" on your DBU and edit however you want. You don't have to worry about remembering anything here (srcseq, srcdata etc.). —Johnson Rodrigues


This was first published in April 2001

Dig deeper on iSeries system performance and monitoring

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchEnterpriseLinux

SearchDataCenter

Close