View previous topic :: View next topic
|
Author |
Message |
lrawat
New User
Joined: 02 Feb 2008 Posts: 19 Location: usa
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
lrawat
New User
Joined: 02 Feb 2008 Posts: 19 Location: usa
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
what is $ coding , is your program being preprocessed compiled by some other software ? |
|
Back to top |
|
|
lrawat
New User
Joined: 02 Feb 2008 Posts: 19 Location: usa
|
|
|
|
Earl Haigh wrote: |
what is $ coding , is your program being preprocessed compiled by some other software ? |
***
actually $JCLLINK is a macro. We code the macro seperately and call the macro from our progs passing parameters required. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
More than 30 years of COBOL programming and I have never seen a COBOL macro. I think it is a preprocessor. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Or possibly something using Librarian/Metacobol (or similar) that is expanded by the compiler. . .
d |
|
Back to top |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
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 |
|
|
SCARCEBOYZ
New User
Joined: 16 May 2005 Posts: 32 Location: Millenium Business Park, Mumbai
|
|
|
|
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 |
|
|
|