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



Here is a simple example of calling the API from CL
sorry for wordwrap still having issues with code.midrange.com
=======================================
CMD PROMPT('Get Short Name')
PARM KWD(LONG) TYPE(*CHAR) LEN(128) MIN(1) +
CHOICE('Long File Name') PROMPT('Long +
File Name')
PARM KWD(LIB) TYPE(*CHAR) LEN(10) DFT(*LIBL) +
CHOICE('Library Name, *LIBL') +
PROMPT('Library Name')
=============
PGM PARM(&LONGNAME &LIB)


DCL VAR(&OBJNAME) TYPE(*CHAR) LEN(20)
DCL VAR(&FILE) TYPE(*CHAR) STG(*DEFINED) LEN(10) DEFVAR(&OBJNAME)
DCL VAR(&FLIB) TYPE(*CHAR) STG(*DEFINED) LEN(10) DEFVAR(&OBJNAME 11)


DCL VAR(&LONGNAME) TYPE(*CHAR) LEN(128)
DCL VAR(&MSG) TYPE(*CHAR) LEN(128)
DCL VAR(&L_NME_LEN) TYPE(*INT) VALUE(128)
DCL VAR(&LIB) TYPE(*CHAR) LEN(10)


CALL PGM(QDBRTVSN) PARM(&OBJNAME &LONGNAME &L_NME_LEN &LIB 0)


CHGVAR VAR(&MSG) VALUE(&FLIB *TCAT '/' || &FILE)


Call QUILNGTX (&msg x'00000015' ' ' ' ' x'0000000000000000')


ENDPGM
=======================================


Rob Berendt wrote on 12/28/2016 3:52 PM:
Turns out that I did have to use the short name for extname here:
dcl-ds Media_library_info extname('MEDIA_INFO') qualified end-ds;

but if I modified that to
dcl-ds Media_library_info extname('MEDIA_INFO') qualified alias end-ds;

I could use the column long names like
fetch ... :Media_Library_Info.Device_Status
and not have to use their short names like
fetch ... :Media_Library_Info.Device_Sts

'alias' does not seem to apply to the extname


Rob Berendt


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.