Interform Document Management Series for iSeries
download interform 400
 

Case Studies

BaxterInterWord400 converts 3,000 former OfficeVision documents in just 3 weeks for UK Healthcare supplier

Weiterlesen...
Home Support FAQs
AFC User dependent distribution

Question:
I want the result of a merge with a spool file to be placed on different output queues depending on which user created the original spool file. Can this be done?

Answer:
Yes. In AFC (Auto Forms Control) do the merge and place the result on a AFC monitored output queue with a special form type e.g. ’MERGE’. On this specific output queue make a call to a exit program conditioned by this form type. The exit program could look like this:

PGM PARM(&JOB &USER &JOBNBR &FILE &FILNBR &OUTQ +
&OUTLIB)

/* Required parameter group */
DCL VAR(&JOB) TYPE(*CHAR) LEN(10)
DCL VAR(&USER) TYPE(*CHAR) LEN(10)
DCL VAR(&JOBNBR) TYPE(*CHAR) LEN(6)
DCL VAR(&FILE) TYPE(*CHAR) LEN(10)
DCL VAR(&FILNBR) TYPE(*CHAR) LEN(4)
DCL VAR(&OUTQ) TYPE(*CHAR) LEN(10)
DCL VAR(&OUTLIB) TYPE(*CHAR) LEN(10)

DCL VAR(&TOOUTQ) TYPE(*CHAR) LEN(10)

/*Specify default queue*/
CHGVAR VAR(&TOOUTQ) VALUE(’DEP00’)

/* Find users output queue */
IF (&USER = 'HVE ') (CHGVAR &TOOUTQ 'DEP01')
IF (&USER = 'KSE ') (CHGVAR &TOOUTQ 'DEP02')

/* Move spooled file to output queue */
CHGSPLFA FILE(&FILE) JOB(&JOBNBR/&USER/&JOB) +
SPLNBR(&FILNBR) OUTQ(&TOOUTQ) FORMTYPE(*STD)

ENDPGM

Click here to try out the product for FREE