Troubleshooting
Problem
There is no command on the IBM i OS that allows you to do the IFS equivalent of WRKOBJLCK for the native file system.
Resolving The Problem
There is no command on the IBM i OS that allows you to do the IFS equivalent of WRKOBJLCK for the native file system. However, the following command source and RPGLE source will create a command that allows you to view lock information for an IFS directory or stream file. The output of the command will be a spooled file that contains information about jobs that are holding locks on an IFS object (file or directory) and the reason they have the lock.
Caution: This is an example only. IBM accepts no responsibility for its correctness. |
Note: Unless otherwise specified, parameters should be passed as null-terminated strings.
Command source: Command name WRKLCK.
CMD
PARM KWD(PATH) TYPE(*CHAR) LEN(500)
RPGLE source: Program name WRKLCK
Dspaceloc S 3P 0
DPATH S 500
DCMD S 1024 INZ(' ')
DQUOTE S 1 INZ('''')
DCMDL S 15 0 INZ(1024)
DQCMDEXC PR EXTPGM('QCMDEXC')
DCMD 1024A OPTIONS(*VARSIZE) CONST
DCMDL 15p 5 CONST
C *ENTRY PLIST
C PARM PATH
C* PARM RTN
/FREE
spaceloc = %scan(' ':path);
path = %subst(path:1:spaceloc);
cmd='CALL QP0FPTOS PARM(*LSTOBJREF '+ QUOTE + %trim(path) + QUOTE + ' +
*FORMAT2)';
QCMDEXC (CMD : %SIZE(CMD));
*INLR = *ON;
/END-FREE
[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]
Historical Number
607928008
Was this topic helpful?
Document Information
Modified date:
18 December 2019
UID
nas8N1011392