MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Submitting a batch job thru IMS DC program
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> IMS
View previous topic :: View next topic  
Author Message
SureshBabu
Beginner


Joined: 24 Mar 2003
Posts: 5
Topics: 1

PostPosted: Mon Mar 24, 2003 12:07 pm    Post subject: Submitting a batch job thru IMS DC program Reply with quote

Hi,
I just new to IMS and till now I worked with CICS and DB2. Is it possible to submit a batch job from an IMS online program.I know that we can do that in CICS by using SPOOL OPEN and SPOOL WRITE .. commands but I don't know how to do it in IMS.Can you help me in achieving this..

Thank you ,
SureshBabu.
Back to top
View user's profile Send private message
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Mon Mar 24, 2003 12:32 pm    Post subject: Reply with quote

If you are using MPPs, try writing the job to JES using the Spool API and assigning the DD to INTRDR.

If you are using DL/I or BMP, write to JES as you would in batch.
Back to top
View user's profile Send private message
SureshBabu
Beginner


Joined: 24 Mar 2003
Posts: 5
Topics: 1

PostPosted: Mon Mar 24, 2003 12:58 pm    Post subject: Reply with quote

Hi Bithead,

Thank you for your quick reply.
Could you pls give any related links for books/manuals for
'IMS Spool API' support.I have been searching for the book "IMS/ESA JES Spool API User’s Guide." suggested in one IMS book but not able to find out.

Thank you,
SureshBabu.
_________________
Thank you,
Suresh Babu.
Back to top
View user's profile Send private message
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Mon Mar 24, 2003 1:12 pm    Post subject: Reply with quote

Check out the Administrators Guide (System) and Application Programming TM. (I am looking at version 7 manuals)
Back to top
View user's profile Send private message
SureshBabu
Beginner


Joined: 24 Mar 2003
Posts: 5
Topics: 1

PostPosted: Tue Mar 25, 2003 9:49 am    Post subject: Reply with quote

Hi Bithead,
Thanks for the earlier info which has helped me knowing more about the concept.
I have gone thru Spool API concept in Application Programming:
Transaction Manager and design guide.
I have understood to some extent on how to write the data to Spool using CHNG followed by ISRT calls(The LTERM being the Spool destination).
You have mentioned about assigning the DD name to INTRDR where exactly should we specify the DD name.. It would be great if you give us the piece of code for this purpose.

Thank you,
Suresh Babu.
_________________
Thank you,
Suresh Babu.
Back to top
View user's profile Send private message
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Tue Mar 25, 2003 10:34 am    Post subject: Reply with quote

The DDNAME to write to is defined using the OUTN parameter in the CHNG call. You will need to add this DD card to the JCL for the MPP region or batch job.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Mar 25, 2003 11:19 am    Post subject: Reply with quote

Sureshbabu,


check this link for a detailed explanation of SPOOL API

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DFSP20E2/APPENDIX1.4?DT=20020320072804

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
SureshBabu
Beginner


Joined: 24 Mar 2003
Posts: 5
Topics: 1

PostPosted: Mon Mar 31, 2003 4:23 am    Post subject: Reply with quote

Hi Kolusu & Bithead,

Thank you very much for your replies.Sorry for the delay in my response as I was on vacation.

Suresh Babu.
_________________
Thank you,
Suresh Babu.
Back to top
View user's profile Send private message
Sreejith
Intermediate


Joined: 02 Dec 2002
Posts: 155
Topics: 25
Location: N.Ireland

PostPosted: Wed Apr 07, 2004 5:27 am    Post subject: Reply with quote

Hi Suresh,
Have you managed to get this working. I am in search of the same. If you know how to do this please let me know.
Sreejith
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
srinivasan_srisailan
Beginner


Joined: 18 May 2004
Posts: 11
Topics: 3

PostPosted: Thu Sep 23, 2004 3:33 pm    Post subject: Reply with quote

Hi all,

Can somebody post a sample code to Submit a batch job from IMS DC program?

Thanks,
Srinivasan
Back to top
View user's profile Send private message
SureshBabu
Beginner


Joined: 24 Mar 2003
Posts: 5
Topics: 1

PostPosted: Thu Sep 23, 2004 5:39 pm    Post subject: Reply with quote

Hi,

Unfortunately I couldn't work on that task till the end as I had to move to a different task at that time. I appreciate if some one can help you in this issue.

Suresh.
_________________
Thank you,
Suresh Babu.
Back to top
View user's profile Send private message
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Fri Sep 24, 2004 9:06 am    Post subject: Reply with quote

Try This:

You will need to add the following card to the JCL for your MPP region:

//P059 OUTPUT CLASS=? <== change as require

or

//P059 DD SYSOUT=(A,INTRDR) <== for submitting JCL

Code:

000010 IDENTIFICATION DIVISION.                                         
000020 PROGRAM-ID.         MPPTRAN1.                                   
000030 AUTHOR.                                                                01
000040 DATE-WRITTEN.       JAN 2000.
000050 DATE-COMPILED.
000060******************************************************************
000070* TEST PROGRAM FOR SPOOL API.
000080******************************************************************
000090
000100 ENVIRONMENT DIVISION.
000110 CONFIGURATION SECTION.
000120 SOURCE-COMPUTER.    IBM-370.
000130 OBJECT-COMPUTER.    IBM-370.
000140 DATA DIVISION.
000150 WORKING-STORAGE SECTION.
000160
000170 01  BRANCH-PRINTER-LTERM        PIC X(08) VALUE 'P059    '.
000180
000190 01  WS-ACTION                   PIC X(08) VALUE SPACES.
000200
000210 01  WS-OPTIONS.
000220     05  OP-LL                               PIC S9(4) COMP.
000230     05  OP-ZZ                               PIC S9(4) COMP.
000240     05  FILLER                              PIC X(22)
000250         VALUE 'IAFP=M1M,OUTN=P059    '.
000260
000270 01  WS-FB-ZERO               PIC X(02) VALUE '  '.
000280
000290 01  WS-FEEDBACK.
000300     05  FB-LL                               PIC S9(4) COMP.
000310     05  FB-ZZ                               PIC S9(4) COMP.
000320     05  FB-CODE                             PIC X(02) VALUE ' '.
000330     05  FILLER                              PIC X(40) VALUE ' '.
000340
000350 01  INPUT-MESSAGE.
000360     05  FILLER                  PIC X(1000).
000370
000380 01  OUTPUT-MESSAGE.
000390     05  OM-LL                               PIC S9(4) COMP.
000400     05  OM-ZZ                               PIC S9(4) COMP.
000410     05  OM-LL2                              PIC S9(4) COMP.
000420     05  OM-ZZ2                              PIC S9(4) COMP.
000430     05  FILLER                              PIC X(29)
000440         VALUE ' MPP01 TEST MESSAGE - DATE : '.
000450     05   SDATE.
000460       07 SDATE-MM               PIC 9(02).
000470       07 FILLER                 PIC X(01) VALUE '/'.
000480       07 SDATE-DD               PIC 9(02).
000490       07 FILLER                 PIC X(01) VALUE '/'.
000500       07 SDATE-CCYY             PIC 9(04).
000510     05   STIME.
000520       07 FILLER                 PIC X(08) VALUE ' TIME : '.
000530       07 STIME-HH               PIC 9(02).
000540       07 FILLER                 PIC X(01) VALUE ':'.
000550       07 STIME-MM               PIC 9(02).
000560     05   FILLER                 PIC X(81) VALUE SPACES.
000570
000580*
000590 01  ABEND-FIELDS.
000600     05  ABEND-TERM-CODE         PIC S9(4)  COMP  VALUE ZERO.
000610     05  ABEND-DUMP-FLAG         PIC X            VALUE 'Y'.
000620*
000630 01  DLI-FUNCTIONS-CODES.
000640     05  GU        PIC X(4)  VALUE 'GU  '.
000650     05  GN        PIC X(4)  VALUE 'GN  '.
000660     05  GNP       PIC X(4)  VALUE 'GNP '.
000670     05  GHU       PIC X(4)  VALUE 'GHU '.
000680     05  GHN       PIC X(4)  VALUE 'GHN '.
000690     05  GHNP      PIC X(4)  VALUE 'GHNP'.
000700     05  ISRT      PIC X(4)  VALUE 'ISRT'.
000710     05  DLET      PIC X(4)  VALUE 'DLET'.
000720     05  REPL      PIC X(4)  VALUE 'REPL'.
000730     05  PURG      PIC X(4)  VALUE 'PURG'.
000740     05  CHNG      PIC X(4)  VALUE 'CHNG'.
000750     05  CHKP      PIC X(4)  VALUE 'CHKP'.
000760     05  LOG       PIC X(4)  VALUE 'LOG '.
000770     05  XRST      PIC X(4)  VALUE 'XRST'.
000780     05  ROLB      PIC X(4)  VALUE 'ROLB'.
000790*
000800
000810 LINKAGE SECTION.
000820
000830 01  TP-PCB.
000840     05  TP-LTERM-NAME       PIC X(8).
000850     05  TP-DLI-RESERVED     PIC XX.
000860     05  TP-STATUS-CD        PIC XX.
000870     05  TP-INPUT-PREFIX.
000880         10  TP-JULIAN-DA    PIC S9(7)   COMP-3.
000890         10  TP-TIME-O-DA    PIC S9(7)   COMP-3.
000900         10  TP-MESSG-SEQ    PIC S9(7)   COMP.
000910     05  TP-FORMAT-NAME      PIC X(8).
000920     05  TP-USER-IDENTIFICATION.
000930         10  TP-USER-ID      PIC X.
000940         10  TP-BRANCH       PIC 99.
000950         10  TP-BCUST        PIC X(5).
000960     05  RESERVED-1          PIC X(8).
000970     05  RESERVED-2          PIC X(12).
000980*
000990 01  ALT-PCB.
001000     05  ALT-DESTINATION         PIC X(8).
001010     05  ALT-DLI-RESERVED        PIC XX.
001020     05  ALT-STATUS-CD           PIC XX.
001030*
001040 PROCEDURE DIVISION.
001050*
001060     ENTRY 'DLITCBL' USING TP-PCB
001070                           ALT-PCB.
001080
001090     MOVE 'START   ' TO WS-ACTION.
001100
001110     MOVE FUNCTION CURRENT-DATE (1:4) TO SDATE-CCYY.
001120     MOVE FUNCTION CURRENT-DATE (5:2) TO SDATE-MM.
001130     MOVE FUNCTION CURRENT-DATE (7:2) TO SDATE-DD.
001140     MOVE FUNCTION CURRENT-DATE (9:2) TO STIME-HH.
001150     MOVE FUNCTION CURRENT-DATE (11:2) TO STIME-MM.
001160
001170     MOVE +141 TO OM-LL.
001180     MOVE +0   TO OM-ZZ.
001190     MOVE +137 TO OM-LL2.
001200     MOVE +0   TO OM-ZZ2.
001210     MOVE +26  TO OP-LL.
001220     MOVE +0   TO OP-ZZ.
001230     MOVE +48  TO FB-LL.
001240     MOVE +0   TO FB-ZZ.
001250
001260     PERFORM 1000-GET-MESSAGE-QUEUE.
001270
001280     PERFORM 2000-PROCESS-MESSAGE
001290         UNTIL TP-STATUS-CD EQUAL TO 'QC'.
001300
001310     MOVE +0 TO RETURN-CODE.
001320
001330     GOBACK.
001340*
001350 1000-GET-MESSAGE-QUEUE.
001360*
001370     MOVE 'GU      ' TO WS-ACTION.
001380
001390     CALL 'CBLTDLI' USING GU
001400                          TP-PCB
001410                          INPUT-MESSAGE.
001420
001430     IF TP-STATUS-CD = SPACES
001440         CONTINUE
001450     ELSE
001460        IF TP-STATUS-CD NOT EQUAL TO 'QC'
001470             CALL 'ABEND'
001480         END-IF
001490     END-IF.
001500*
001510 2000-PROCESS-MESSAGE.
001520
001530     MOVE 'CHNG    ' TO WS-ACTION.
001540
001550     CALL 'CBLTDLI' USING CHNG
001560                          ALT-PCB
001570                          BRANCH-PRINTER-LTERM
001580                          WS-OPTIONS
001590                          WS-FEEDBACK.
001600
001610     IF ALT-STATUS-CD = SPACES AND
001620        FB-CODE  = LOW-VALUES
001630         NEXT SENTENCE
001640     ELSE
001650         CALL 'ABEND'
001660     END-IF.
001670*
001680     MOVE 'ISRT    ' TO WS-ACTION.
001690
001700     CALL 'CBLTDLI' USING ISRT
001710                          ALT-PCB
001720                          OUTPUT-MESSAGE.
001730
001740     IF ALT-STATUS-CD = SPACES
001750         NEXT SENTENCE
001760     ELSE
001770         CALL 'ABEND'
001780     END-IF.
001790
001800     PERFORM 1000-GET-MESSAGE-QUEUE.
001810*

Back to top
View user's profile Send private message
Sreejith
Intermediate


Joined: 02 Dec 2002
Posts: 155
Topics: 25
Location: N.Ireland

PostPosted: Wed May 10, 2006 4:12 am    Post subject: Reply with quote

Hi Bithead,
I tried the code you provided. But I am getting an A1 status code while issuing the change. One of the cause for A1 is invalid transaction name. the DD catd in the online region JCL looks like this. So I use INTRDR as transaction name inplace where your code put P079

Code:

 33 XXINTRDR   DD  SYSOUT=(F,INTRDR)   


Do you have any clue what's wrong here

thanks
Sreejith
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Thu May 11, 2006 10:03 am    Post subject: Reply with quote

Try changing SYSOUT=(F,INTRDR) to SYSOUT=* and see if you get the JCL spooled. This will check if there is a problem when writing to the internal reader.
Back to top
View user's profile Send private message
Sreejith
Intermediate


Joined: 02 Dec 2002
Posts: 155
Topics: 25
Location: N.Ireland

PostPosted: Mon May 15, 2006 4:47 am    Post subject: Reply with quote

Bithead,
Thanks for the reply.
while "cut and paste" I missed the move 26 to OP-LL and that's why I go the A1 error. corrected that. But now I am getting an AX status code while inserting. The CHNG didn't give any error. As per QW AX means
Code:
 Explanation:  A failure to get CSA storage, a failure of the DFSLUMIF       
call, or a processing error with the IAFP Spool API occurred. When this     
code is returned, diagnostic information is written to the log in a '67D0'   
log record. Spool API processing errors return a DFS0013E message.           
                                                                             
A RACROUTE REQUEST=VERIFY,EVIRON=CREATE (RACF RACINIT) made during an AUTH   
call for LU 6.2 was unsuccessful.                                           
                                                                             
An OTMA user exit returned invalid routing information. See OTMA return     
codes in the IMS Version 7 Open Transaction Manager Access Guide,           
SC26-9434.                                                                   
                                                                             
Programmer Response:  These problems usually require the help of a system   
programmer or system administrator.                                         



I tried it by chaning to SYSOUT=*. But same result
I guess only the Sysprog here can help me.

do you have any clue why this is giving an AX


thanks
Sreejith
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> IMS All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group