Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Submitting multiple Batch Jobs thru CICS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
lrawat

New User


Joined: 02 Feb 2008
Posts: 19
Location: usa

PostPosted: Mon Apr 07, 2008 9:58 pm    Post subject: Submitting multiple Batch Jobs thru CICS
Reply with quote

hi friends, i m trying to submit a batch job thru cics online screen. i pass db-key to the batch job for processing.
the code is within a para which can be called multiple times.
incase the code is called once it is working fine, I mean job gets submitted with proper db-key and runs with return code zero.
however when the para is made to run 2 times causing job to get submitted twice, job runs with same db-key, however cics is passing different db-key for each run of batch job. so same record gets processed by batch job twice. batch job should run with different db-key as passed by cics.
any idea, thanks for your time!!!
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Mon Apr 07, 2008 10:15 pm    Post subject: Re: Submitting multiple Batch Jobs thru CICS
Reply with quote

lrawat wrote:
incase the code is called once it is working fine, I mean job gets submitted with proper db-key and runs with return code zero.
OK....
Quote:
however when the para is made to run 2 times causing job to get submitted twice, job runs with same db-key, however cics is passing different db-key for each run of batch job.
Exactly how is the job being 'made to run'?
Exactly how is the job being 'cics is passing'the db-key?
Back to top
View user's profile Send private message
lrawat

New User


Joined: 02 Feb 2008
Posts: 19
Location: usa

PostPosted: Mon Apr 07, 2008 10:57 pm    Post subject: Submitting multiple Batch Jobs thru CICS
Reply with quote

hi, please find below code for reference. if you want i can provide you extended listing of this code too..

Code:
MAIN-PARA.
     OBTAIN CURRENT R143-SHIPSET-R                   
     $STATUS.                                       
                                                     
     IF W001-FLG-WMS-HSE = 'Y'                       
     AND R143-FLG-PRINT = 'Y'                       
         CALL 'CVT2DEC' USING DBKEY                 
                              W002-DBKEY-WS         
         MOVE W002-DBKEY-WS TO W002-DBKEY-DISPLAY   
         MOVE R143-NUM-HSE  TO W002-NUM-HSE         
         $DO 2500-WRITE-JCL.                         
MAIN-PARA-EXIT.

************************************************   
*      2500-WRITE-JCL.                             
************************************************   
 2500-WRITE-JCL.                                   
                                                   
     MOVE 'SC046'    TO W002-PROC-NAME.             
     MOVE 'SHIPPRNT'  TO W002-JOB-NAME.             
                                                   
     $JCLVSET VARIABLE 'PROC-NAME'                 
              VALUE    W002-PROC-NAME               
                       C                           
     $JCLVSET VARIABLE 'ZJOBNAME'                   
              VALUE    W002-JOB-NAME               
                       C                           
     $JCLVSET VARIABLE 'ZCHAR'                     
              VALUE    W002-NUM-HSE                 
                        C                           
     $JCLVSET VARIABLE 'DBKEY'                     
              VALUE    W002-DBKEY-DISPLAY           

                       C                                   
     $JCLVSET VARIABLE 'DBNUM'                             
              VALUE    W002-DBNUM-WS                       
                       C                                   
                                                           
     EXEC CICS ASSIGN APPLID(W002-APPLID) END-EXEC.         
                                                                                             
       $JCLLINK LINK.             
                                 
 2500-WRITE-JCL-EXIT.             
     EXIT.                       

*?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Mon Apr 07, 2008 11:18 pm    Post subject:
Reply with quote

That does not give me a clue......
Maybe somebody who programs in '$' might be able to provide an answer.....
$STATUS?
$DO 2500-WRITE-JCL?
$JCLLINK LINK?
And that ubiquitous 'C'?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Apr 08, 2008 12:13 am    Post subject:
Reply with quote

Hello,

Might it be that you are performing 2500-WRITE-JCL multiple times, but this code (MOVE W002-DBKEY-WS TO W002-DBKEY-DISPLAY) is only executed once?

As was mentioned, your post is rather incomplete.
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Wed Apr 09, 2008 4:58 am    Post subject:
Reply with quote

what is $ coding , is your program being preprocessed compiled by some other software ? icon_question.gif icon_question.gif icon_question.gif icon_question.gif
Back to top
View user's profile Send private message
lrawat

New User


Joined: 02 Feb 2008
Posts: 19
Location: usa

PostPosted: Wed Apr 09, 2008 9:20 am    Post subject:
Reply with quote

Earl Haigh wrote:
what is $ coding , is your program being preprocessed compiled by some other software ? icon_question.gif icon_question.gif icon_question.gif icon_question.gif



***
actually $JCLLINK is a macro. We code the macro seperately and call the macro from our progs passing parameters required.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Apr 09, 2008 5:06 pm    Post subject:
Reply with quote

More than 30 years of COBOL programming and I have never seen a COBOL macro. I think it is a preprocessor.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Apr 09, 2008 8:44 pm    Post subject: Reply to: Submitting multiple Batch Jobs thru CICS
Reply with quote

Or possibly something using Librarian/Metacobol (or similar) that is expanded by the compiler. . .

d
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Thu Apr 10, 2008 3:57 am    Post subject:
Reply with quote

Hey Crag,

I'm almost 40 years at programming, and I too have never seen a COBOL macro. As Dick indicates, it must eb some time of preprocessor.

Irawat,

do you know any more about it ?
Back to top
View user's profile Send private message
SCARCEBOYZ

New User


Joined: 16 May 2005
Posts: 32
Location: Millenium Business Park, Mumbai

PostPosted: Tue May 06, 2008 4:29 pm    Post subject:
Reply with quote

Yes Dick ...you are correct...thats basicaly Metacobol coding..This is being used by GE Supply' XPD2 Application for more than 30 years.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Batch job tunning sgandhla Testing & Performance analysis 0 Fri Mar 24, 2017 9:41 pm
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 6 Fri Mar 24, 2017 2:24 pm
No new posts MIPS/CPU consumption reduction in Batch vishwakotin DFSORT/ICETOOL 4 Sat Mar 18, 2017 5:46 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us