IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Submitting multiple Batch Jobs thru CICS


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
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
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: 2146
Location: At my coffee table

PostPosted: Mon Apr 07, 2008 10:15 pm
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
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: 2146
Location: At my coffee table

PostPosted: Mon Apr 07, 2008 11:18 pm
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

Moderator Emeritus


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

PostPosted: Tue Apr 08, 2008 12:13 am
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
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
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
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

Moderator Emeritus


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

PostPosted: Wed Apr 09, 2008 8:44 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Finding and researching jobs All Other Mainframe Topics 0
No new posts Using API Gateway from CICS program CICS 0
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts submitting feedback for manuals All Other Mainframe Topics 3
Search our Forums:

Back to Top