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




Is there a 'green screen' or programmatic API that will create a share for
an IFS folder ?

Yes. You can find information about APIs in the Information Center. Go to http://www.iseries.ibm.com/infocenter after you've selection your release level & language, click on the following:
Programming -> APIs -> APIs by Category -> Server


I wrote a proof-of-concept CL program that creates a temporary share on-the-fly, allows the user to grab a file from it, when done the user hits enter and it un-shares the directory.

I wrote this a long time ago and haven't used it since then, but here's the source code in case it's helpful to you:

PGM
             DCL        VAR(&SHARE) TYPE(*CHAR) LEN(12)
             DCL        VAR(&PATH) TYPE(*CHAR) LEN(128)
             DCL        VAR(&PATHLEN) TYPE(*CHAR) LEN(4)
             DCL        VAR(&CCSID) TYPE(*CHAR) LEN(4)
             DCL        VAR(&TEXT) TYPE(*CHAR) LEN(50)
             DCL        VAR(&PERM) TYPE(*CHAR) LEN(4)
             DCL        VAR(&MAXUSERS) TYPE(*CHAR) LEN(4)
             DCL        VAR(&ERRORS) TYPE(*CHAR) LEN(16)
             DCL        VAR(&WORK) TYPE(*CHAR) LEN(4)
             DCL        VAR(&MSGNO) TYPE(*CHAR) LEN(7)

             MKDIR      DIR('/item') DTAAUT(*EXCLUDE) OBJAUT(*NONE)
             MONMSG     MSGID(CPF0000)

             DLTF       FILE(QTEMP/ITEMTEST)
             MONMSG     MSGID(CPF2105)

             CRTPF      FILE(QTEMP/ITEMTEST) RCDLEN(422)

             CPYF       FROMFILE(QS36F/ITMMAST) +
                          TOFILE(QTEMP/ITEMTEST) FROMMBR(*FIRST) +
                          TOMBR(ITEMTEST) MBROPT(*REPLACE) +
                          FMTOPT(*NOCHK)

             CPYTOSTMF  FROMMBR('/qsys.lib/qtemp.lib/itemtest.file/+
                          itemtest.mbr') +
                          TOSTMF('/item/itmmast.dat') STMFOPT(*ADD) +
                          STMFCODPAG(*PCASCII) ENDLINFMT(*FIXED)

             CHGVAR     VAR(&SHARE) VALUE('item')
             CHGVAR     VAR(&PATH) VALUE('/item')
             CHGVAR     VAR(%BIN(&PATHLEN)) VALUE(5)
             CHGVAR     VAR(%BIN(&PERM)) VALUE(2)
             CHGVAR     VAR(%BIN(&CCSID)) VALUE(0)
             CHGVAR     VAR(&TEXT) VALUE('Item Master Test Share')
             CHGVAR     VAR(%BIN(&MAXUSERS)) VALUE(5)

             CHGVAR     VAR(%BIN(&WORK)) VALUE(16)
             CHGVAR     VAR(%SST(&ERRORS 1 4)) VALUE(&WORK)
             CHGVAR     VAR(%BIN(&WORK)) VALUE(0)
             CHGVAR     VAR(%SST(&ERRORS 5 4)) VALUE(&WORK)

             CALL       PGM(QZLSADFS) PARM(&SHARE &PATH &PATHLEN +
                          &CCSID &TEXT &PERM &MAXUSERS &ERRORS)

             CHGVAR     VAR(&WORK) VALUE(%SST(&ERRORS 5 4))
             IF         COND(%BIN(&WORK) *NE 0) THEN(DO)
                 CHGVAR VAR(&MSGNO) VALUE(%SST(&ERRORS 9 7))
                 SNDUSRMSG  MSG('Message' *BCAT &MSGNO *BCAT +
                          'occurred while sharing directory')
             ENDDO

             SNDUSRMSG  MSG('Grab the file and then press ENTER')

             CALL       PGM(QZLSRMS) PARM(&SHARE &ERRORS)
             CHGVAR     VAR(&WORK) VALUE(%SST(&ERRORS 5 4))
             IF         COND(%BIN(&WORK) *NE 0) THEN(DO)
                 CHGVAR VAR(&MSGNO) VALUE(%SST(&ERRORS 9 7))
                 SNDUSRMSG  MSG('Message' *BCAT &MSGNO *BCAT +
                              'occurred while removing share')
             ENDDO

ENDPGM


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.