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
 

 

how to invoke a batch job from online using TDQ
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
arun203

New User


Joined: 27 Mar 2007
Posts: 10
Location: bangalore

PostPosted: Tue Mar 27, 2007 3:44 pm    Post subject: how to invoke a batch job from online using TDQ
Reply with quote

Hi,
I want to invoke a batch job using online program using extrapartition TDQ. How to do this and what are the prerequisites required for this?
Please share a sample code if any
Thank You
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Mar 27, 2007 4:40 pm    Post subject:
Reply with quote

It would be much neater to use the SPOOL functionality, but I suppose that the output of a TD queue could be input to an internal reader.
As far as sample code goes, it's just RDO for the TDQ and a DD statement.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Mar 27, 2007 8:29 pm    Post subject:
Reply with quote

Ask your CICS system programmers to allocate the TDQ to INTRDR.

O.
Back to top
View user's profile Send private message
arun203

New User


Joined: 27 Mar 2007
Posts: 10
Location: bangalore

PostPosted: Wed Mar 28, 2007 10:38 am    Post subject: how to allocate TDQ as internal reader
Reply with quote

Hi,
I want to use an extrapartition TDQ to invoke a batch job from online program. For this i need to allocate TDQ as internal reader. Could any one tell the process of doing so?
Also what is the significance of the DD card
//IRDR DD SYSOUT=(A,INTRDR)
Where to add this DD card if required?
Back to top
View user's profile Send private message
arun203

New User


Joined: 27 Mar 2007
Posts: 10
Location: bangalore

PostPosted: Wed Mar 28, 2007 3:36 pm    Post subject:
Reply with quote

The program from whcih i am trying to invoke a batch job:

Code:
ID DIVISION.                                                 
 PROGRAM-ID. BATCH203.                                         
 DATA DIVISION.                                               
 WORKING-STORAGE SECTION.                                     
 01 78-TABLE-SIZE PIC 9(00) VALUE 9.                           
 01 WS-TABLE.                                                 
     05 FILLER  PIC X(80) VALUE                               
        '//G50383J  JOB ,,CLASS=A,MSGCLASS=A,NOTIFY=&SYSID  '.
     05 FILLER  PIC X(80) VALUE                               
        '//STEP1 EXEC PGM=IEFBR14                  '.         
     05  FILLER PIC X(80) VALUE                               
        '//NEWDSN DD DSN=G50383.SAMPLE.DSN.TEST,   '.         
     05  FILLER PIC X(80) VALUE                               
        '//       DISP=(NEW,CATLG),                '.         
     05  FILLER PIC X(80) VALUE                               
        '//       DCB=(LRECL=80,RECFM=FB,DSORG=PS),'.         
     05  FILLER PIC X(80) VALUE                               
        '//       SPACE=(800,(10,10)),UNIT=SYSDA   '.         
     05  FILLER PIC  X(80) VALUE                               
        '/*                                        '.         
     05  FILLER PIC  X(80) VALUE                               
        '//                                        '.         
     05  FILLER PIC X(80) VALUE                               
        '/*EOF                                     '.         
 01  FILLER REDEFINES WS-TABLE.                               
     05 WS-TABLE-LINE OCCURS 9 TIMES PIC X(80).               
 01  WS-QUEUE   VALUE 'IRDR'           PIC X(4).               
 01  WS-X                              PIC 9(2).       
 PROCEDURE DIVISION.                                   
     PERFORM A000-WRITE-PARA VARYING WS-X FROM 1 BY 1   
              UNTIL WS-X > 78-TABLE-SIZE.               
     EXEC CICS SEND FROM(WS-TABLE)                     
               ERASE                                   
     END-EXEC                                           
     EXEC CICS RETURN                                   
     END-EXEC.                                         
 A000-WRITE-PARA.                                       
     EXEC CICS WRITEQ TD                               
               QUEUE(WS-QUEUE)                         
               FROM (WS-TABLE-LINE(WS-X))               
               LENGTH(80)                               
     END-EXEC.           


I have added //INREADER DD SYSOUT=(A,INTRDR) to the CICS startup JCL. I also added a DCT entry with queue name as"IRDR" and DD name as "INREADER". The DSN, TDQ is using is of type FIXED, UNBLOCKED with recordsize 80.
After doing all this still iam not able to invoke batch job from online.What might be the problem? Could any one pls help me out ? Is the program which i have written has got any errors?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Mar 28, 2007 3:40 pm    Post subject:
Reply with quote

1. You are not supposed to define a TD queue. This is a job for your system guys. I hope they know how to allocate in to INTRDR.
2. The card in your example should be the output of some copy operation (for example: using IEBGENER). This means the output will be sent to the internal reader (that is - submitted as job).

O.
Back to top
View user's profile Send private message
arun203

New User


Joined: 27 Mar 2007
Posts: 10
Location: bangalore

PostPosted: Wed Mar 28, 2007 3:59 pm    Post subject:
Reply with quote

Is there any other way to allocate TDQ as internal reader other than adding a DD card //DDname DD SYSOUT=(A,INTRDR) to the CICS startup JCL ?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Mar 28, 2007 4:51 pm    Post subject:
Reply with quote

AFAIK - No, but you can always use CICS's SPOOL commands.

O.
Back to top
View user's profile Send private message
arun203

New User


Joined: 27 Mar 2007
Posts: 10
Location: bangalore

PostPosted: Wed Mar 28, 2007 4:57 pm    Post subject:
Reply with quote

Hi,
Thank you for the reply.But i need to invoke batch job from TDQ.
TDQ has been defined to internal reader by the sysadmin using the dd card //DDname DD SYSOUT=(A,INTRDR).
But still i am unable to invoke the job from online.
What might be the reasons for this?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Mar 28, 2007 5:41 pm    Post subject:
Reply with quote

Don't you have to push something through the intrdr to indicate that it should go ahead and release the job? Some eof thing?
Back to top
View user's profile Send private message
arun203

New User


Joined: 27 Mar 2007
Posts: 10
Location: bangalore

PostPosted: Wed Mar 28, 2007 5:49 pm    Post subject:
Reply with quote

Hi Thompson,
I am using /*EOF at the end of the JCL but still iam not able to invoke a batch job.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Mar 28, 2007 6:34 pm    Post subject:
Reply with quote

What about the LOG/CICS LOG? Do you see anything there?

O.
Back to top
View user's profile Send private message
arun203

New User


Joined: 27 Mar 2007
Posts: 10
Location: bangalore

PostPosted: Thu Mar 29, 2007 8:46 am    Post subject:
Reply with quote

This may be a basic question. How to see the CICS LOG?
Back to top
View user's profile Send private message
arun203

New User


Joined: 27 Mar 2007
Posts: 10
Location: bangalore

PostPosted: Thu Mar 29, 2007 11:43 am    Post subject:
Reply with quote

This are the statements that are found in CICS LOG

03/29/2007 09:37:47 CICS Signoff at netname IP403 by user G50383 is complete. 9 transactions entered with 2
errors.
DFHZC3462 I 03/29/2007 09:37:47 CICS P403 CSNE Node IP403 session terminated. ((2) Module name: DFHZCLS)
NQNAME P403,CSNE, 9:37:47,ZOS14A IP403
DFHZC5966 I 03/29/2007 09:37:47 CICS1 DELETE started for TERMINAL ( P403) (Module name: DFHBSTZ).
DFHZC6966 I 03/29/2007 09:37:47 CICS Autoinstall delete for terminal P403 with netname IP403 was successful.

I could not make head and tail of it
Any one pls help
Back to top
View user's profile Send private message
arun203

New User


Joined: 27 Mar 2007
Posts: 10
Location: bangalore

PostPosted: Fri Mar 30, 2007 10:02 am    Post subject:
Reply with quote

Hi,
From the CISC LOG i got that the program got terminated.
Wat might be the reasons for this to happen?
Back to top
View user's profile Send private message
shagnwrx

New User


Joined: 07 Jul 2006
Posts: 17
Location: Birmingham, AL

PostPosted: Fri Mar 30, 2007 11:52 pm    Post subject:
Reply with quote

Are you seeing a message like this?
"$HASP396 nnnnnnn TERMINATED" with nnnnnnn being your jobname.

If so, take a look a few lines preceding this termination message... Look for something like a JCL error regarding the job.
Back to top
View user's profile Send private message
arun203

New User


Joined: 27 Mar 2007
Posts: 10
Location: bangalore

PostPosted: Mon Apr 02, 2007 10:19 am    Post subject:
Reply with quote

Do we need to give LREC,RECFM,BLKSIZE along with the DD card for the Internal Reader like
//INREADER DD SYSOUT=(,INTRDR)
DCB= (LREC=80,RECFM=FB,BLKSIZE=80)
????????????????????/
Back to top
View user's profile Send private message
Pete Eagleton

New User


Joined: 14 Feb 2007
Posts: 11
Location: Chicago

PostPosted: Sat Apr 07, 2007 12:57 am    Post subject:
Reply with quote

Code:
EXEC CICS SPOOLOPEN OUTPUT                 
    TOKEN(WS-JES-TOKEN)                     
    USERID(WS-JES-USERID)                   
    NODE(WS-JES-NODE)                       
    CLASS(WS-JES-CLASS)                     
    NOCC                                   
    RESP(WS-JES-RESP)                       
    RESP2(WS-JES-RESP-2)                   
END-EXEC.                                   
IF WS-JES-RESP EQUAL DFHRESP(NORMAL)       
    GO TO 1000-SPOOL-WRITE.
 1000-SPOOL-WRITE.                                           
     ADD +1                      TO  WS-SUB.                 
     IF WS-SUB GREATER THAN +19,                             
         EXEC CICS SPOOLCLOSE                                 
             TOKEN(WS-JES-TOKEN)                             
             KEEP                                             
             RESP(WS-JES-RESP)                               
         END-EXEC                                             
         GO TO 1100-END-JES.                                 
     MOVE WS-JCL-CARD (WS-SUB)   TO  WS-JES-CARD.             
     EXEC CICS SPOOLWRITE                                     
         TOKEN(WS-JES-TOKEN)                                 
         FROM(WS-JES-CARD)                                   
         LINE                                                 
         RESP(WS-JES-RESP)                                   
     END-EXEC.                                               
     IF WS-JES-RESP EQUAL DFHRESP(NORMAL),                   
         GO TO 1000-SPOOL-WRITE.                             
     MOVE "ERROR ON JES WRITE"   TO  WS-JES-ERROR.           
     EXEC CICS SEND TEXT
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Sat Apr 07, 2007 1:26 am    Post subject:
Reply with quote

arun203 wrote:
From the CISC LOG i got that the program got terminated.
Wat might be the reasons for this to happen?
How do you mean "got terminated"?
It looks like a program that you would execute at a terminal, right?
Start CEDF before you enter your tranid and insure that it follows all the commands you want.
Before this, change the DD to a direct sysout so you can "see" what is really being pushed out the TDQ.
Keep us informed....
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: Sat Apr 07, 2007 1:32 am    Post subject:
Reply with quote

Hello,

From the initial post - this
Quote:
01 78-TABLE-SIZE PIC 9(00) VALUE 9.
is hopefully a copy/paste error. . . .?
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
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
This topic is locked: you cannot edit posts or make replies. MIPS reduction for Batch job Virendra Shambharkar All Other Mainframe Topics 8 Mon Nov 07, 2016 4:02 pm
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm
No new posts How to show message using batch jobs madprasy TSO/ISPF 7 Fri Sep 09, 2016 6:55 pm


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