I'm using this parameters to the first CL
DELETE OLD SPOOLED FILES (DLTOLDSPLF)
Type choices, press Enter.
DAYS TO RETAIN SPOOLED FILES . . > 99 Character value
Hi Silvarb,
First thing I notice is field &DIAS *DEC 3 0 '99' F9F9 - This is invalid, try calling the program like this :-
DLTOLDSPLF X'099F'
I don't think this is the solution to all your problems, so let me know how this goes. If it crashes, take another dump for us.
Regards,
Martin Gilbert.
Martin my friend,
Thanks for all your Help, now it's works, so, How can i do after this help (rsrsrs), see the log.
Display All Messages
System: TDBSBC25
Job . . : QPADEV001K User . . : RBDSILVA Number . . . : 624429
1700 - CVTDAT DATE('080612') TOVAR(&DATA2J) FROMFMT(*YMD) TOFMT(*JUL)
TOSEP(*NONE)
- RETURN /* RETURN due to end of CL program */
2100 - RCVF DEV(*FILE) RCDFMT(*FILE) WAIT(*YES) OPNID(*NONE) /*
File name is DLTOLDSPLF. */
2300 - CALL PGM(DIFDATA) /* The CALL command contains
parameters */
1500 - CVTDAT DATE('080612') TOVAR(&DATA1J) FROMFMT(*YMD) TOFMT(*JUL)
TOSEP(*NONE)
1700 - CVTDAT DATE('080612') TOVAR(&DATA2J) FROMFMT(*YMD) TOFMT(*JUL)
TOSEP(*NONE)
- RETURN /* RETURN due to end of CL program */
2100 - RCVF DEV(*FILE) RCDFMT(*FILE) WAIT(*YES) OPNID(*NONE) /*
File name is DLTOLDSPLF. */
4200 - SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('00351 SPOOLFILES
DELETADOS') MSGTYPE(*COMP)
- RETURN /* RETURN due to end of CL program */
> DSPJOB
> DSPJOB
/* */
>> DSPJOB
Ok Martin, I'm try to explicate:
When I use my CL with this parameter DLTOLDSPLF ’099’ or '99' or other with 2 or 3 characters, I receive that error on the DUMP.
When use your sugestion with this parameter DLTOLDSPLF X’099F’ the process works normally.
Now I don't know what I do, cause I know where this CL is wrong, or a help to implement this CL to run normally all days.
Thanks again and sorry , my english is not good.
Regards,
silvarb
Silvarb,
I think what it is, you have created a command called DLTOLDSPLF.
This command uses your CL program.
Your CL program has a number-of-days parameter &DIAS which is defined as decimal, 3 digits.
BUT, I suspect that the command declares this parameter as a character value of length 3.
Change the command source to declare the parameter as :
PARM KWD(DIAS) TYPE(*DEC) LEN(3)....
....and now the comand will match up with the CL.
Regards,
Sloopy
Hi Silvarb,
Now I know what you mean.
I suggest you add an extra variable for your parameter :-
DCL VAR(&DIASIN) TYPE(*CHAR) LEN(3)
Then at the start of your program :-
CHGVAR VAR(&DIAS) VALUE(&DIASIN)
This should then take the alphanumeric parameter and put it into the decimal variable &DIAS.
Regards,
Martin.
Hi,
I see our friend Sloopy has also just answered. Thinking about it, his answer is probably a better option, then you shouldn't need to change your CL program.
Regards,
Martin.
It's not what you asked for, but did you know there is already a DLTOLDSPLF command written that has worked for many years ? Check out http://www.hkrebs.dk/dltoldsplf.html
Hi,
Works great, I just put an app together where you set the number of days back you want to delete old files and it only deletes those files that are contained in my table containing outq and user.
Discuss This Question: 14  Replies