Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
Posted: Tue Jul 10, 2018 8:18 am Post subject: Defining an AIBNAME for use in an EXEC DLI call
I'm trying to understand how I define my PSB so as to use an AIB name in my cobol code. At the moment, the standard method of accessing a database is
Code:
EXEC DLI GN
USING PCB (1)
SEGMENT (SDC16PA)
INTO (SDC16PA)
SEGLENGTH (PA-SEGLENGTH)
END-EXEC
If I understand the manual correctly, I can change this call to
Code:
EXEC DLI GN
AIB(AIBNAME)
SEGMENT (SDC16PA)
INTO (SDC16PA)
SEGLENGTH (PA-SEGLENGTH)
END-EXEC
Where I'm getting stuck is how I define the AIB name in my PSB. I'm trying the following (unfortunately, where I work, any changes to a PSB aren't genned until the next day). This is my best attempt which compiled okay (not that that actually says anything)
The use of the word FRED is deliberate here only so it's obvious that if I say I think/hope the AIB name is FRED everyone understands which value I'm referring to.
If I'm wrong, can anyone tell me how the PSB should be defined ????
Edited and added following. Fortunately, I had some old examples of what the layout was supposed to be. My problem was that I removed the PCB keyword. Here's my final example
move 'DDC16' to AIBRSNM1
move length of sdc16pa to AIBOALEN
move 'GN' to AIBSFUNC
* This commented EXEC DLI call is an example of one that also failed
* EXEC DLI GN
* AIB (AIB)
* SEGMENT (SDC16PA)
* INTO (SDC16PA)
* SEGLENGTH (PA-SEGLENGTH)
* END-EXEC
EXEC DLI GN
AIB (AIB)
into (SDC16PA)
END-EXEC
Whichever variation I use, I abend.
Does anyone have an example of an EXEC DLI call that uses an AIB ?
Forgot to mention, the existing PCB code looks like this
Code:
EXEC DLI GN
USING PCB (1)
SEGMENT (SDC16PA)
INTO (SDC16PA)
SEGLENGTH (PA-SEGLENGTH)
END-EXEC
works fine, so there's nothing wrong with the database or anything like that. _________________ Michael
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
Posted: Fri Jul 13, 2018 6:42 am Post subject:
A simple follow-on question. In an IBM manual I found the following:-
Quote:
LIST=NO must not be specified on any PCBs in the PSB
What is the default value if you don't specify any LIST parm/value ?
(if it turns out to be No, then that might explain WHY the program crashes) _________________ Michael
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
Posted: Sat Sep 01, 2018 1:36 am Post subject:
No. Whenever I have a little time over, I try and think up some new variation I haven't tried. And see if that'll help.
Next week, when I'm back at work, I'll paste in the AIB result variables after the call crashes, but they didn't seem to help much (return and reason codes were both zero) _________________ Michael
DDC16 is the name of the AIB in the PSB, and 50 is the length of the segment to retrieve. Here is te actual "compiled" code when debugging
Code:
move 'DDC16' to AIB-pcb-name
move length of sdc16pa to AIB-seg-length
XEC DLI GET NEXT
AIB (aib)
SEGMENT (SDC16PA)
INTO (SDC16PA)
SEGLENGTH (PA-SEGLENGTH)
END-EXEC
Move '04' to dibver of dlzdib
Call 'DFHEI1' using by content x'000c780007010101c4d3c9404040
'4040f0f0f9f2f940404094100084000000' by reference dlzdib by
reference aib by content 'SDC16PA ' by reference SDC16PA by
reference PA-SEGLENGTH end-call
As I mentioned earlier, if I do an ordinary GET NEXT USING PCB ...
as shown here
Code:
XEC DLI GET NEXT
USING PCB (1)
SEGMENT (SDC16PA)
INTO (SDC16PA)
SEGLENGTH (PA-SEGLENGTH)
END-EXEC
Move '04' to dibver of dlzdib
Move 1 to dfhb0020
Call 'DFHEI1' using by content x'000c780007010101c4d3c9404040
'4040f0f0f9f1f3404040d0100084000000' by reference dlzdib by
reference dfhb0020 by content 'SDC16PA ' by reference SDC16PA
by reference PA-SEGLENGTH end-call
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