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



We know that when an exit pgm is added/removed to/from qibm_qpwfs_file_serv
that "QSERVER" needs to be restarted to recognize that change.
However a colleague tells me that is the blunt object approach, and a more
precise approach can be taken to limit the exposure to operations. He
suggested the following (which I coded) but does not seem to work.
It is not working by definition of… after the restartQSERVER() process is
run, when I click on my map drive, my QZLSFILE single threaded file server
job does not spawn and I get a windows map drive error.

Can anyone recommend the correct steps to do this?

dcl-proc restartQSERVER export; 2 dcl-pi *n; 3 end-pi; 4 5
//--------------------------------------- 6 // local vars 7
//--------------------------------------- 8 dcl-s l_wait ind inz; 9 dcl-s
l_tries int(5) inz; 10 dcl-s l_command char(2048) inz; 11 12 // end only
that which is necessary... 13 l_command = 'QSYS/ENDTCPSVR SERVER(*NETSVR)';
14 exec sql call qsys2.qcmdexc(:l_command); 15 16 l_command =
'QSYS/ENDHOSTSVR SERVER(*FILE)'; 17 exec sql call
qsys2.qcmdexc(:l_command); 18 19 l_command = 'QSYS/ENDPJ SBS(QSERVER)
PGM(QSYS/QZLSFILE) ' + 20 'OPTION(*IMMED)'; 21 exec sql call
qsys2.qcmdexc(:l_command); 22 23 l_command = 'QSYS/ENDPJ SBS(QSERVER)
PGM(QSYS/QZLSFILET) ' + 24 'OPTION(*IMMED)'; 25 exec sql call
qsys2.qcmdexc(:l_command); 26 27 l_command = 'QSYS/ENDPJ SBS(QSERVER)
PGM(QSYS/QPWFSERVSD) ' + 28 'OPTION(*IMMED)'; 29 exec sql call
qsys2.qcmdexc(:l_command); 30 31 l_command = 'QSYS/ENDPJ SBS(QSERVER)
PGM(QSYS/QPWFSERVS2) ' + 32 'OPTION(*IMMED)'; 33 exec sql call
qsys2.qcmdexc(:l_command); 34 35 l_command = 'QSYS/ENDPJ SBS(QSERVER)
PGM(QSYS/QPWFSERVSO) ' + 36 'OPTION(*IMMED)'; 37 exec sql call
qsys2.qcmdexc(:l_command); 38 39 l_command = 'QSYS/ENDPJ SBS(QSERVER)
PGM(QSYS/QPWFSERVSS) ' + 40 'OPTION(*IMMED)'; 41 exec sql call
qsys2.qcmdexc(:l_command); 42 43 // continue to check to be sure all
necessary jobs ended... 44 // if retries > 10, restart anyways... 45 l_wait
= *on; 46 dow l_wait; 47 l_tries += 1; 48 if l_tries > 60; 49 leave; 50
endif; 51 l_command = 'DLYJOB DLY(1)'; 52 exec sql call
qsys2.qcmdexc(:l_command); 53 l_wait = *off; 54 exec sql 55 select 1 56
into :l_wait 57 from table(qsys2.active_job_info 58 (subsystem_list_filter
=> 'QSERVER')) 59 where server_type in ('QIBM_NETSERVER' 60
,'QIBM_NETDRIVE' 61 ,'QIBM_OS400_QZBS_SVR_FILE'); 62 enddo; 63 64 //
restart... 65 l_command = 'QSYS/STRPJ SBS(QSERVER) PGM(QSYS/QZLSFILE)'; 66
exec sql call qsys2.qcmdexc(:l_command); 67 68 l_command = 'QSYS/STRPJ
SBS(QSERVER) PGM(QSYS/QZLSFILET)'; 69 exec sql call
qsys2.qcmdexc(:l_command); 70 71 l_command = 'QSYS/STRPJ SBS(QSERVER)
PGM(QSYS/QPWFSERVSD)'; 72 exec sql call qsys2.qcmdexc(:l_command); 73 74
l_command = 'QSYS/STRPJ SBS(QSERVER) PGM(QSYS/QPWFSERVS2)'; 75 exec sql
call qsys2.qcmdexc(:l_command); 76 77 l_command = 'QSYS/STRPJ SBS(QSERVER)
PGM(QSYS/QPWFSERVSO)'; 78 exec sql call qsys2.qcmdexc(:l_command); 79 80
l_command = 'QSYS/STRPJ SBS(QSERVER) PGM(QSYS/QPWFSERVSS)'; 81 exec sql
call qsys2.qcmdexc(:l_command); 82 83 l_command = 'QSYS/STRTCPSVR
SERVER(*NETSVR)'; 84 exec sql call qsys2.qcmdexc(:l_command); 85 86
l_command = 'QSYS/STRHOSTSVR SERVER(*FILE)'; 87 exec sql call
qsys2.qcmdexc(:l_command); 88 89 return; 90 91 end-proc;


tia

Jay

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.