|
Just a thought... Have seen where cpysplf *last is not definite enough. CPYSPLF FILE(QPQUPRFIL) TOFILE(QTEMP/SPOOL) + SPLNBR(*LAST) What you describe is is getting another spool file. The help text for cpysplf doesn't say *last is the last spool for this job. "The spooled file with the highest number and the specified file name is used. " Since this is the only qry report in this job, try *ONLY. If your system generates lots of spool numbers, you could have old qpquprfil spools with high spool numbers. hth jim ----- Original Message ----- From: <rob@xxxxxxxxx> To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx> Sent: Monday, March 03, 2003 3:36 PM Subject: Re: Grabbing wrong spool file > Here it is again. > > /* Group Dekko Services, LLC */ > /* ALL RIGHTS RESERVED. */ > /* */ > /* This program will ... */ > /* */ > /* */ > /* Modification log: */ > /* 08/10/99 by R.Berendt, CDP GDS,LLC */ > /* Created */ > /* */ > /* */ > PGM > > DCL &APOS *CHAR 1 /* Apostrophe */ > DCL &SQLSTMT *CHAR 200 /* SQL statement */ > DCL &SYSTEM *CHAR 8 /* System name */ > > CHGVAR VAR(&APOS) VALUE(X'7D') > > /* + > | Retrieving network attributes + > */ > SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA( + > 'Retrieving network attributes.' + > ) TOPGMQ(*EXT) MSGTYPE(*STATUS) > RTVNETA SYSNAME(&SYSTEM) > > /* + > | Refresh the list of users. + > */ > SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA( + > 'Refreshing the list of users.' + > ) TOPGMQ(*EXT) MSGTYPE(*STATUS) > DSPUSRPRF USRPRF(*ALL) OUTPUT(*OUTFILE) OUTFILE(QTEMP/USERS) > > /* + > | Create the spool file of users + > */ > SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA( + > 'Creating the spool file of users.' + > ) TOPGMQ(*EXT) MSGTYPE(*STATUS) > RUNQRY QRY(MAXSTORAGE) > > /* + > | Copy the spool file into a disk file + > */ > SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA( + > 'Copying the spool file into a disk file.' + > ) TOPGMQ(*EXT) MSGTYPE(*STATUS) > DLTF FILE(QTEMP/SPOOL) > MONMSG MSGID(CPF2105) /* File not found */ > CRTPF FILE(QTEMP/SPOOL) RCDLEN(150) > CPYSPLF FILE(QPQUPRFIL) TOFILE(QTEMP/SPOOL) + > SPLNBR(*LAST) > > /* + > | Merge the heading file and the spool file + > */ > SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA( + > 'Merging the heading file and the spool file.' + > ) TOPGMQ(*EXT) MSGTYPE(*STATUS) > DLTF FILE(QTEMP/MESSAGE) > MONMSG MSGID(CPF2105) /* File not found */ > CRTPF FILE(QTEMP/MESSAGE) RCDLEN(150) > CPYF FROMFILE(MAXSTORAGE) + > TOFILE(QTEMP/MESSAGE) MBROPT(*ADD) + > FMTOPT(*NOCHK) > /* + > | Append system name to end of subject line. + > | UPDATE QTEMP/MESSAGE + > | SET MESSAGE=SUBSTR(MESSAGE,1,66) CONCAT ' - ' + > | CONCAT &SYSTEM + > | WHERE SUBSTR(MESSAGE,1,7)='Subject' + > */ > CHGVAR VAR(&SQLSTMT) VALUE('UPDATE QTEMP/MESSAGE + > SET MESSAGE=SUBSTR(MESSAGE,1,66) CONCAT + > ' *CAT &APOS *CAT ' - ' *CAT &APOS *CAT + > ' CONCAT ' *CAT &APOS *CAT &SYSTEM *CAT + > &APOS *CAT ' WHERE + > SUBSTR(MESSAGE,1,7)=' *CAT &APOS *CAT + > 'Subject' *CAT &APOS) > RUNSQL REQUEST(&SQLSTMT) > /* + > | Insert system name. + > */ > CHGVAR VAR(&SQLSTMT) VALUE('INSERT INTO + > QTEMP/MESSAGE VALUES(' *TCAT &APOS *TCAT + > &SYSTEM *TCAT &APOS *TCAT ')') > RUNSQL REQUEST(&SQLSTMT) > CPYF FROMFILE(QTEMP/SPOOL) TOFILE(QTEMP/MESSAGE) + > MBROPT(*ADD) FMTOPT(*NOCHK) > > /* + > | Ensure that working directory exists, and working file does not. > + > */ > SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA( + > 'Ensuring that working directory exists and working file doesnt' > + > ) TOPGMQ(*EXT) MSGTYPE(*STATUS) > MD DIR('/qtemp') > MONMSG MSGID(CPFA0A0) > DEL OBJLNK('/qtemp/maxstg.txt') > MONMSG MSGID(CPFA0A9) > > /* + > | Send the file to the selected users + > */ > SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA( + > 'Sending the file to the selected users.' + > ) TOPGMQ(*EXT) MSGTYPE(*STATUS) > IF COND(&SYSTEM *NE 'GDISYS') THEN(DO) > SNDEMAIL10 FILE(MESSAGE) LIB(QTEMP) MBR(MESSAGE) + > STMF('/qtemp/maxstg.txt') + > ORIGINATOR(ROB@xxxxxxxxx) + > RECIPIENT( + > (ROB@xxxxxxxxx) + > (PEGGY@xxxxxxxxx) + > (TROYM@xxxxxxxxx) + > (KEVINR@xxxxxxxxx) + > ) > ENDDO > ELSE CMD(DO) > SNDEMAIL10 FILE(MESSAGE) LIB(QTEMP) MBR(MESSAGE) + > STMF('/qtemp/maxstg.txt') + > ORIGINATOR(ROB@xxxxxxxxx) + > RECIPIENT( + > (ROB@xxxxxxxxx) + > (PEGGY@xxxxxxxxx) + > (KEVINR@xxxxxxxxx) + > ) > ENDDO > /* + > | Delete spool file + > */ > SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA( + > 'Deleting the spool file.' + > ) TOPGMQ(*EXT) MSGTYPE(*STATUS) > DLTSPLF FILE(QPQUPRFIL) SPLNBR(*LAST) > > > END: > > ENDPGM > > Rob Berendt > -- > "They that can give up essential liberty to obtain a little temporary > safety deserve neither liberty nor safety." > Benjamin Franklin > > > > > "Jim Franz" <franz400@xxxxxxxxxxxx> > Sent by: midrange-l-bounces@xxxxxxxxxxxx > 03/03/2003 02:30 PM > Please respond to Midrange Systems Technical Discussion > > To: "Midrange Systems Technical Discussion" > <midrange-l@xxxxxxxxxxxx> > cc: > Fax to: > Subject: Re: Grabbing wrong spool file > > > Show the code. How is the spool file data passed to your > email process? > jim > ----- Original Message ----- > From: <rob@xxxxxxxxx> > To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx> > Sent: Monday, March 03, 2003 1:45 PM > Subject: Re: Grabbing wrong spool file > > > > Nice try. But that job is submitted from the WRKJOBSCDE. I can't see > how > > it would have any of those overrides. > > > > Rob Berendt > > -- > > "They that can give up essential liberty to obtain a little temporary > > safety deserve neither liberty nor safety." > > Benjamin Franklin > > > > > > > > > > Scott Klement <klemscot@xxxxxxxxxxxx> > > Sent by: midrange-l-bounces@xxxxxxxxxxxx > > 03/03/2003 01:18 PM > > Please respond to Midrange Systems Technical Discussion > > > > To: Midrange Systems Technical Discussion > > <midrange-l@xxxxxxxxxxxx> > > cc: > > Fax to: > > Subject: Re: Grabbing wrong spool file > > > > > > > > On Mon, 3 Mar 2003 rob@xxxxxxxxx wrote: > > > > > > One of the problems is, that on RARE occasions the wrong spool file is > > > grabbed. Not only is the spool file name different, but the spool > file > > > was originated outside of this job. Can't figure out how that could > > > happen. > > > > > > > You wouldn't happen to have an old OVRPRTF still hanging around, would > > you? Maybe OVRPRTF FILE(*PRTF) TOFILE(QSYSPRT) or something similar? > > > > Just a thought. > > > > _______________________________________________ > > This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing > > list > > To post a message email: MIDRANGE-L@xxxxxxxxxxxx > > To subscribe, unsubscribe, or change list options, > > visit: http://lists.midrange.com/mailman/listinfo/midrange-l > > or email: MIDRANGE-L-request@xxxxxxxxxxxx > > Before posting, please take a moment to review the archives > > at http://archive.midrange.com/midrange-l. > > > > > > _______________________________________________ > > This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing > list > > To post a message email: MIDRANGE-L@xxxxxxxxxxxx > > To subscribe, unsubscribe, or change list options, > > visit: http://lists.midrange.com/mailman/listinfo/midrange-l > > or email: MIDRANGE-L-request@xxxxxxxxxxxx > > Before posting, please take a moment to review the archives > > at http://archive.midrange.com/midrange-l. > > > > > > > _______________________________________________ > This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing > list > To post a message email: MIDRANGE-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/midrange-l > or email: MIDRANGE-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/midrange-l. > > > _______________________________________________ > This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list > To post a message email: MIDRANGE-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/midrange-l > or email: MIDRANGE-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/midrange-l. > >
As an Amazon Associate we earn from qualifying purchases.
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.