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



What about using CHGJOB LOG(4 00 *NOLIST) LOGCLPGM(*NO) then after the
proc completes change the job logging back?

After rudimentary testing this worked for me:

Main proc JUNKME10
pgm                                                  
                                                     
   sndpgmmsg msg('main proc') tousr(myuser)         
   chgjob log(4 00 *nolist) logclpgm(*no)            
   call junkme11                                     
   chgjob log(4 00 *seclvl) logclpgm(*yes)           
   sndpgmmsg msg('main proc again') tousr(myuser)   
   return                                            
   endpgm                                            

Subproc:
pgm                                                   
                                                      
             SNDPGMMSG  MSG('Hi dude') TOUSR(myuser) 
             return                                   
             endpgm                                    

The resulting joblog:
 Message . . . . :      300 - SNDPGMMSG MSG('main proc') TOUSR(myuser)

    12/14/06  09:19:43.101568  QCADRV       QSYS        0393
JUNKME10   
 To module . . . . . . . . . :   JUNKME10

 To procedure  . . . . . . . :   JUNKME10

 Statement . . . . . . . . . :   400

 Message . . . . :      400 - CHGJOB LOG(4 00 *NOLIST) LOGCLPGM(*NO)

    12/14/06  09:19:43.103432  QCADRV       QSYS        0393
JUNKME10   
 To module . . . . . . . . . :   JUNKME10

 To procedure  . . . . . . . :   JUNKME10

 Statement . . . . . . . . . :   700

 Message . . . . :      700 - SNDPGMMSG MSG('main proc again')
TOUSR(myuser)

Thanks,
Tommy Holden


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Lim Hock-Chai
Sent: Thursday, December 14, 2006 8:49 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: Removing joblog 

Thanks Tommy.  I'm more looking into joblog of an active job not the
spooled joblog. 

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Holden Tommy
Sent: Wednesday, December 13, 2006 3:03 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: Removing joblog 

You could use DLTSPLF & qualify the job name, user &number to delete
SPLF QPJOBLOG and run it in a loop until all are deleted....

Cmd = 'DLTSPLF QPJOBLOG JOB(' + JobNumber+'/'+User+'/'+JobName+')
SPLNBR(*LAST)';

// insert your favorite never-ending loop here...
DoU 'FOREVER'<>'FOREVER';
Monitor;
  QCMDEXC(Cmd:%Len(Cmd));
On-Error;
  Leave;
EndMon;
EndDo;


Thanks,
Tommy Holden


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Lim Hock-Chai
Sent: Wednesday, December 13, 2006 2:38 PM
To: RPG programming on the AS400 / iSeries
Subject: Removing joblog 

I've an export procedure that could generate non or many joblogs.
Before it returns control back to the caller, I want to delete all
joblogs that generated by this sub-procedure (Includes any joblog may
have generated by other procedures or commands that it called/used) .
Below is what I came up with.  I'm thinking there must be a better way
than this.
 
Here is what I came up with:
1) Send a program message at the beginning of this export procedure.  
2) Receive the message that sent on step #1 and save the message key.
3) Right before return to caller, Receive and remove *last message in
loop until it hits the message key saved on step #2.
 
 
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.



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.