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
 

 

Calling an IMS subroutine

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
View previous topic :: :: View next topic  
Author Message
rexzone1

New User


Joined: 16 Dec 2006
Posts: 14
Location: Halifax, Canada

PostPosted: Mon Dec 18, 2006 10:14 pm    Post subject: Calling an IMS subroutine
Reply with quote

Hi,

I am using a Driver program which calls an IMS subroutine.
What do I need to do in my program other than IO-PCB?
Please suggest.

Regards,
Ravi..
Back to top
View user's profile Send private message

Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Tue Dec 19, 2006 3:17 pm    Post subject:
Reply with quote

Everything the subroutine needs to operate correctly. We lack information to give you a proper answer. Please provide us with the functions of the subroutine.
Back to top
View user's profile Send private message
rexzone1

New User


Joined: 16 Dec 2006
Posts: 14
Location: Halifax, Canada

PostPosted: Sun Dec 24, 2006 11:42 pm    Post subject: Re: Calling an IMS subroutine
Reply with quote

The subroutine is accessing the IMS databases to retrieve the information and my program calls the subroutine whenever my input file has the record which satisfies my processing logic to call the subroutine. When I am making a call to the subroutine, I am passing the values to be checked to the subroutine, the subroutine goes and searches the database, then returnes with the completion code back to my program. Is it enough or you need some other information?
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Wed Dec 27, 2006 7:40 pm    Post subject:
Reply with quote

Hi Ravi,

This will do. Your mainprogram should call the subroutine supplying just the values to be checked, the returncodefield and the DB-PCB of the database the subroutine accesses. No IO-PCB required if no messages are sent/read by the subroutine. Sometime earlier a similar topic occurred.

Sorry for the late answer: got some days off.
Back to top
View user's profile Send private message
rexzone1

New User


Joined: 16 Dec 2006
Posts: 14
Location: Halifax, Canada

PostPosted: Thu Dec 28, 2006 5:22 am    Post subject: Re: Calling an IMS subroutine
Reply with quote

No probs sir. Thanks for the inputs. Means I just need to pass the values I want to be checked to the subroutine and subroutine will do its processing and provide me the values back in my Linkage Area, correct?
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Thu Dec 28, 2006 3:01 pm    Post subject:
Reply with quote

I will give an example. My language is PL1 but I'll try some kind of COBOL for your sake icon_wink.gif

MAINPROGRAM:
PROCEDURE DIVISION USING IO-PCB, DB-PCB.
MOVE 'VALUE TO BE CHECKED' TO VAR.
MOVE SPACE TO RETURN-CODE.
CALL SUBROUTINE USING VAR, RETURN-CODE, DB-PCB.
IF RETURN-CODE = 'OK'
DISPLAY 'WE DID WELL'
ELSE
DISPLAY 'WE DID WRONG'.

SUBROUTINE:
PROCEDURE DIVISION USING VAR, RETURN-CODE, DB-PCB.
MOVE VAR TO SSA.
CALL CBLTDLI USING 4, GU, DB-PCB, IO-AREA, SSA.
CHECK THE IO-AREA.
IF ALL IS RIGHT
MOVE 'OK' TO RETURN-CODE.
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 -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Calling procedure with multiple entri... steve-myers PL/I & Assembler 5 Fri Jan 27, 2017 3:33 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts "DFSRRC00 vs IKJEFT01" for ... arunsoods All Other Mainframe Topics 5 Fri Aug 12, 2016 9:54 pm
No new posts How to get the program name of callin... pkmurali COBOL Programming 8 Mon Aug 01, 2016 3:36 am
No new posts Calling Cobol DB2 program from a cobo... nkjain87 DB2 2 Thu Jul 21, 2016 5:12 pm


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