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



Earlier this month, I converted a bunch of end-of-month file reorgs/cleanups
to a combination of CLP/SQL (RUNSQLSTM command) from CLP/RPG.  Many of you
helped me with this for which I am grateful.

Last night one of them bombed.  It was using a UDF called ISOTODEC which
converts an ISO date to decimal YYYYMMDD.  The error the operator got was
"Position 1 ISOTODEC in *LIBL type *N not found".  I tried it myself and got
"Position 1 ISOTODEC in JLCLIB type *SRVPGM not found".  I did a CHGCURLIB
DILGARD and then it worked.

DILGARD is the current library for every user profile (including the
operator) except for me.  And library DILGARD is where *SRVPGM ISOTODEC
exists.

I looked in an SQL redbook section on UDFs.  As near as I can tell, it
should be using the library list to find the UDF.  The error the operator
got stating not found in *LIBL confirms that, I think, but type *N doesn't
seem right.  When it failed for me it looks like it was only looking in
JLCLIB, but type *SRVPGM is right.

RUNSQLSTM default for NAMING is *SYS.  ISOTODEC exists _only_ in DILGARD.

Here is the entire script:

--                                                
-- Add items marked for deletion to old items file
--                                                
INSERT INTO OLITMMST
              (SELECT A.*,
              ISOTODEC(CURRENT DATE)
              FROM DMITMMST A
              WHERE ACREC = 'D');
--
-- Remove items marked for deletion
--
DELETE FROM DMITMMST WHERE ACREC = 'D';

As you can see, it's not too complicated.  Where has my thinking gone awry?


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.