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



Dave, I got this to work, with double apostrophes around the desired text:

CALL QCMDEXC ('CHGLF FILE(vern/myidx) text(''This is an index'')', x'000000004700000F')

What is $SYSCMD?

When working with character arguments in functions, declare them as VARCHAR instead of CHAR - leterals are converted to VARCHAR, not CHAR.

Regards

Vern

At 03:15 PM 10/16/2003 -0400, you wrote:
I am trying to assign text to my SQL index and am having problems!

When creating a view or a table I have the "Label on" command to assign text to my object.
What we do with all of our SQL created tables, views, and indexes is create a source member like the following:


-- *****************************************************************
-- INDEX:   INDEXI01
-- FILE:    FILE
-- KEY:     ORDER BY STATUS, EFFECTIVE FLAG
-- RUNSQLSTM  SRCFILE(QDDSSRC) SRCMBR(INDEXI01) +
--             COMMIT(*NONE) NAMING(*SQL)
-- *****************************************************************
CREATE INDEX INDEXI01
ON FILE
 (STATUS, EFFLG);

RENAME INDEX DIPDPI01 TO FILE_STATUS_EFFLG FOR SYSTEM NAME INDEXI01;

CALL $SYSCMD('CHGLF FILE(INDEXI01) WAITRCD(*NOMAX) LVLCHK(*NO)');

--*
We then execute the RUNSQLSTM shown in the header of the member to creating the object.


Because I can't do a Label on with my index, I have to assign the object text via CHGLF or CHGOBJD. The problem is I can not pass a command string in my call that includes a quote:

CALL $SYSCMD('CHGLF FILE(INDEXI01) WAITRCD(*NOMAX) LVLCHK(*NO) TEXT('OBJECT TEXT')'); does not work!

I end up with: String ') ' contains a character that is not valid.

I've tried every combination of single, double, and triple quote that I know around my text string.
Leaving the quotes out all together around the text string also does not work.
I've also created an SQL function to execute instead of a call, which apparently is not allowed when using RUNSQLSTM.


Does anyone know how I can get text assigned to an index via an SQL member and the RUNSQLSTM?

David J. Smith
IT Contractor
dsmith@xxxxxxxxx
517.546.5400 Ext: 1513



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.