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



I hope you don't mind, but I have a few thoughts on re-engineering your process.

I'm assuming (!) that the file you're reading is the spooled file you just CPYSPLFd.

But there's no need to delete the file and then re-print it by copying it to QPRINT:

Try CHGSPLFA FILE(SPLFLE) JOB(*) SPLNBR(*LAST) OUTQ(QPRINT) to move the spooled file to the outq you want it in.

If you are going to re-print the file, you may want to change the file to 133 bytes and add the parm CTLCHAR(*FCFC). This captures the line spacing and skipping parameters so the CPYF to QPRINT can re-generate the spooled file exactly as it was captured. This would also push the message ID one space to the right, so you'd need to CHGVAR &MSGID from 2 for 7.

I'm further assuming that this job is constantly running in order to capture the ATC1425 messages. Depending on how often this job runs, you might be better off using the system scheduler to run this every X minutes.

As far as watching for a message-- I think you can put QSYSOPR in *BREAK mode to a program. The program receives every message as it is posted to the queue, so you don't have to do any watching-- the messages are handed to you.

Paul E Musselman
PaulMmn@xxxxxxxxxxxxxxxxxxxx

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of fbocch2595@xxxxxxx
Sent: Thursday, October 27, 2011 2:55 PM
To: midrange-l@xxxxxxxxxxxx
Subject: CLP Question

Hi Folks, when I run this code;

DLY: +
DLTF FILE(QTEMP/T2853PF)
MONMSG MSGID(CPF0000)
CRTPF FILE(QTEMP/T2853PF) RCDLEN(132)
MONMSG MSGID(CPF0000)
DSPMSG MSGQ(QSYSOPR) OUTPUT(*PRINT)
CPYSPLF FILE(QPDSPMSG) TOFILE(QTEMP/T2853PF) SPLNBR(*LAST)
DLTSPLF FILE(QPDSPMSG) SPLNBR(*LAST)
CPYF FROMFILE(QTEMP/T2853PF) TOFILE(QPRINT)
READ: +
RCVF
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(END))
CHGVAR VAR(&MSGID) VALUE(%SST(&T2853PF 1 7))
IF COND(&MSGID *EQ 'ATC1425') THEN(DO)
CALL PGM(T2853C1)
ENDDO
GOTO CMDLBL(DLY)

I'm getting this after the code goes to DLY again;

3200 - DLTSPLF FILE(QPDSPMSG) SPLNBR(*LAST)
3400 - RCVF DEV(*FILE) RCDFMT(*FILE) WAIT(*YES) OPNID(*NONE)
File name is T2853PF. */
2400 - DLTF FILE(QTEMP/T2853PF)
Cannot do operation on file T2853PF in QTEMP.

What do I have to do to be able to DLTF the file?

Thanks


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.