View previous topic :: View next topic
|
Author |
Message |
rexzone1
New User
Joined: 16 Dec 2006 Posts: 14 Location: Halifax, Canada
|
|
|
|
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 |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
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 |
|
|
rexzone1
New User
Joined: 16 Dec 2006 Posts: 14 Location: Halifax, Canada
|
|
|
|
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 |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
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 |
|
|
rexzone1
New User
Joined: 16 Dec 2006 Posts: 14 Location: Halifax, Canada
|
|
|
|
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 |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
I will give an example. My language is PL1 but I'll try some kind of COBOL for your sake
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 |
|
|
|