View previous topic :: View next topic
|
Author |
Message |
Dibyendu Mandal
New User
Joined: 08 Dec 2011 Posts: 10 Location: India
|
|
|
|
I have to write a new I/O where I have to use GU/GHU/ISRT calls.
But the programs which are going to call my program will not send PCBs(as there are around 100 non-IMS programs in call chain). I understand the only solution to overcome this is AIBTDLI call where we have to send the PCB name.
I tried to search some sample program,but not getting anywhere,not in Google and not even in forum.
Can anybody help me on this?
1. What will be the AIB block structure(any specific structure)
2. How many times I have to do AIBTDLI call( I guess once) and what will be the structure.
3. How can I set the pointer.
4. After that can I use normal CBLTDLI call for ISRT/GU/GHU |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Did you try looking in the IMS manuals - you seem to have mentioned everywhere except those and the manuals are the first place to search. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
Back to top |
|
|
Dibyendu Mandal
New User
Joined: 08 Dec 2011 Posts: 10 Location: India
|
|
|
|
Hi , I am able to implement AIBTDLI in my IMS program. Thanks Anuj. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Good to hear this is working - thank you for letting us know.
If you post what you did (or changed) it may help someone else with a similar situation later. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Dibyendu Mandal wrote: |
Hi , I am able to implement AIBTDLI in my IMS program. Thanks Anuj. |
Glad to hear that. As Dick has said, it'd be nice to share what worked for you that might help someone later with similar question. |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
What I use has this AIB block:
Code: |
01 WS-AIB-MASK.
05 WS-AIB-EYECATCHER PIC X(08) VALUE 'DFSAIB '.
* NEEDS 4
05 WS-AIB-ALLOC-LENGTH PIC 9(09) COMP VALUE 0.
05 WS-AIB-SUB-FUNC-CDE PIC X(08) VALUE SPACES.
05 WS-AIB-RESOURCE-NAME PIC X(08) VALUE SPACES.
05 FILLER PIC X(16).
* NEEDS 4
05 WS-AIB-MAX-OUTPUT-LEN PIC 9(09) COMP VALUE 0.
* NEEDS 4
05 WS-AIB-OUTPUT-LEN-USED PIC 9(09) COMP VALUE 0.
05 FILLER PIC X(12).
05 WS-AIB-RETURN-CODE.
10 WS-AIB-RETURN-CODE-NBR PIC 9(7) COMP VALUE 0.
05 WS-AIB-REASON-CODE.
10 WS-AIB-REASON-CODE-NBR PIC 9(7) COMP VALUE 0.
05 FILLER PIC X(04).
* NEEDS 4
05 WS-AIB-RESOURCE-ADDR POINTER.
05 FILLER PIC X(48).
|
Then, in my linkage, I have a one size fits all PCB mask:
Code: |
LINKAGE SECTION.
01 SOME02RZ-PCB.
05 SOME02RZ-DBD-NAME PIC X(8).
05 SOME02RZ-SEG-LEVEL PIC X(2).
05 SOME02RZ-STAT-CODE PIC X(2).
05 SOME02RZ-PROC-OPT PIC X(4).
05 SOME02RZ-RSVR-DLI PIC X(4).
05 SOME02RZ-SEG-NAME-FB PIC X(8).
05 SOME02RZ-LENGTH-KFB PIC S9(5) COMP.
05 SOME02RZ-NO-SEN-SEG PIC S9(5) COMP.
05 SOME02RZ-KEY-FB-AREA PIC X(66).
|
My AIB call gets the name from the program and makes the call, then I use SET to make the generic PCB point to the address of the proper database PCB.
Code: |
MOVE WS-CURR-PARTITION TO WS-AIB-RESOURCE-NAME
MOVE 128 TO WS-AIB-ALLOC-LENGTH
MOVE LENGTH OF COMMON-IO-AREA TO WS-AIB-MAX-OUTPUT-LEN
CALL 'AIBTDLI' USING GN-FUNC
WS-AIB-MASK
COMMON-IO-AREA.
SET ADDRESS OF SOME02RZ-PCB TO WS-AIB-RESOURCE-ADDR.
|
Then, I can use the PCB just like a 'normal' IMS program.
Code: |
EVALUATE SOME02RZ-STAT-CODE
|
This is a VERY simple example that is used for a VERY simple extract. With a little bit of set up, you could grab a bunch of PCBs and get them all addressable in the same way. |
|
Back to top |
|
|
|