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



> Hi - I am working on a report that used CL and RPG programs. 
> The first CL calls an RPG that prompts for date. This RPG 
> Currently then calls a second CL, which does the rest of the 
> job. I would like this call to to go into Batch instead of 
> currently as interactive without having to code a new CL that 
> will simply Submit the second CL, Is there a way to do this? 

Here's how I do it (I removed extraneous stuff):

/* RUN A CONTRACT */                                           
                                                               
             PGM        PARM(&DATE &BIDNO) 
                                                               
/* PARAMETER VARIABLES */                                      
                                                               
             DCL        VAR(&DATE) TYPE(*CHAR) LEN(8)          
             DCL        VAR(&BIDNO) TYPE(*CHAR) LEN(4)         
                                                               
/* OTHER VARIABLES */                                          
                                                               
             DCL        VAR(&TYPE1) TYPE(*CHAR) LEN(1)         
                                                               
/* GET JOB ATTRIBUTES */                                       

             RTVJOBA    TYPE(&TYPE1)

 

/***************/                                                    
/* INTERACTIVE */                                                    
/***************/                                                    
 

             IF         COND(&TYPE1 *EQ '1') THEN(DO)

             SBMJOB     CMD(CALL PGM(CLBIDS) PARM(&DATE &BIDNO)) +        
                          JOB(CLBIDS) JOBQ(QBATCH)          
             SNDPGMMSG  MSGID(CPF9897) MSGF(QCPFMSG) +

                          MSGDTA('Contract listing has been +

                          submitted for bid #' *TCAT &BIDNO *TCAT '.')

             RETURN

             ENDDO

 

/*********/                                                      
/* BATCH */                                                      
/*********/                                                      
                                                                         
Blah blah blah . . .

-- 
Jeff Crosby
Dilgard Frozen Foods, Inc.
P.O. Box 13369
Ft. Wayne, IN 46868-3369
260-422-7531

The opinions expressed are my own and not necessarily the opinion of my
company.  Unless I say so.
 

> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx 
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of simafrog
> Sent: Wednesday, March 03, 2004 8:03 AM
> To: RPG programming on the AS400 / iSeries
> Subject: Problem with calling RPG from CL and to Submit
> 
> Another problem I noticed is that when I did create the 
> additional CL to submit the second CL, I entered dates (from 
> -to) twice and a second job went onto the job queue. When 
> this second job ran it bombed on a data decimal error. Do I 
> need to close Files or something else to ensure that this 
> wouldn't happen again?
> Thanks,
> Rob
> 
> 
> _______________________________________________
> 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.