IMS, DL/1 and DB2 positioning
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> Application Programming

#1: IMS, DL/1 and DB2 positioning Author: misi01Location: Stockholm, Sweden PostPosted: Sun Aug 21, 2022 5:55 am
    —
Background
We are running IMS and converting DL/1 programs to DB2.
One of the programs is a 3270 one using the usual MFS panel.
The program ONLY reads the DL/1 database.
The logic in the program is approximately this:
Code:
S100:
   perform read-mid
   if PF3-equivalent, leave
   perform process-input
   perform write-mod
   go to S100


(the program was written in 1984 !!!!)

The program allows the user to scroll left/right by 4 DL/1 segments at a time.
One of the aspects of it that has puzzled me is the following.
Assume this scenario: -
Users sees first 4 segments (1-4). Presses PF11 to see 5-8.
The first thing the program does is to do a GU on the root, then read "past" the first 4
after which reads segments 5-8 and presents them

I can see that, having done a GU on the root, it has to read "past" previous segments to
get to its starting point, but my first question would be. is the GU necessary, or is
it a case that IMS might have/has swapped the program out, and as a result, when it's swapped
back in, the child position has been lost?

Now, to the equivalent DB2 cursor code. I saw some interesting links on declaring a cursor as scrollable (never used it myself).
- does it work in IMS and do I need to declare the cursor as FOR HOLD?
- is IMS potentially swapping the program in and out goint to be a problem such that the cursor is lost?

#2:  Author: kolusuLocation: San Jose PostPosted: Sun Aug 21, 2022 7:00 am
    —
misi01,

Probably the MFS panel is defined with an array of 4 entries at a time. So you fetch the data for first 4 segments and present it. The next segments retrieval is a brand new call as the program does NOT know where the pointer is and hence the GU call.

As for DB2 you don't have to worry about it as you can now define a bigger array and then show the contents. Cursor with HOLD is done to avoid closing the cursor when a commit or syncpoint is done (typically updating the contents of the cursor)



MVSFORUMS.com -> Application Programming


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group