Please enable JavaScript to view this site.

The Cobwebb Folder Monitor is a utility that will monitor an IFS folder at a frequency defined by the "Poll interval" and call a specified "Program to call" each time a file is found. If the file is processed successfully it is deleted, or moved to a defined "Success Folder" otherwise it is moved to the defined "Failed Folder".

This can be useful if you wish put files in a folder that you wish to store in the Cobwebb Docstore or maybe FTP to a different Server.

For details on how to create a program to process the files from the folder being monitored please see Creating a bespoke Folder Monitor program or you can ask Cobwebb to create one for you.

From Version 6.2.62 -  Cobwebb supply a selection of Monitor Types which have their own specific Programs and Parameters which can be used - please see Supplied Folder Monitor programs for details.

Configuring CPPD to use the Cobwebb Folder Monitor

There are two ways to configure CPPD to use the Cobwebb Folder Monitor:

1.Add a Work with Folder Monitor entry - from v6.2.37.

2.Add a bespoke Autostart job to the CPPD Subsystem - prior to v6.2.37.

FLRMON Parameters

Note: These details are only required if you are on a version of Cobwebb Server prior to v6.2.37 and need to call the Folder Monitor (FLRMON) by adding a bespoke Autostart job, otherwise you would add a new Folder Monitor via the Work with Folder Monitor menu option.

Parameter

Length

Description

Example

Required

PARM1

255

Folder to Monitor

'/test/flrmon'

PARM2

255

Failed Folder

'/test/flrmon/failed'

PARM3

10

Monitor Program to call

‘PRTTXTC’

See Creating a bespoke Folder Monitor program for details.

Optional

PARM4

10

Program library

COBEXIT

PARM5

3

Poll interval (mins)

10 [Default 5 mins]

PARM6

3

Poll interval (secs)

30

PARM7

10

EDCDIC Code page used for file name conversions.

1146 [Default 1146]

PARM8

10

The Locale used for file name conversions.

EN_GB [Default EN_GB]

Use "WRKOBJ OBJ(QSYS/*ALL) OBJTYPE(*LOCALE)" to see currently installed locales.

Use "DSPSYSVAL SYSVAL(QLOCALE)" to see current locale.

PARM9

1

Call regardless

(Should the Monitor program be called every poll interval even when there are no files to be processed?)

'Y' [Default 'N']

Example Call

CALL PGM(FLRMON) PARM('/test/flrmon' '/test/flrmon/failed' 'PRTTXTFC' 'COBEXIT' '1')

The above example would monitor the folder /test/flrmon every one minute. For each file found it will call the call the program COBEXIT/PRTTXTFC with two parameters – the path to the file (CHAR 255) and the return code (CHAR 1). When the program returns, if the return code is 0x00 then the program is deemed successful and the file is deleted. Otherwise the program is deemed to have failed and the file is moved to the failed folder, in this case /test/flrmon/failed. Note:  FLRMON was designed to be run in a subsystem and if run interactively will only check the folder once before exiting.