Title: Web Enablement: Challenges and Solutions http://www.uark.edu/basis/UAWEB/Challenges.html
1Web EnablementChallenges and Solutionshttp//ww
w.uark.edu/basis/UAWEB/Challenges.html
- David Wimberly
- University of Arkansas
- wdw_at_uark.edu
2Web Enablement Challenges
- Field help
- Selecting data
- Accommodating the browser Back button
- Stateless forward and backward browsing of ADABAS
data
3Background
- Long term Natural/ADABAS shop
- All non-student systems developed in house --
BASIS - Late to web enable
- Inexperienced and unschooled
- Com-Plete v6.1 HTTP Server
- Natural as the CGI language
- Natural code generated via Natural ISPF macros
41. Field Help
- Traditionally available on 3270 terminals as help
windows - Solution, three web examples
- Technique
- Selecting help and opening a window
- Passing parameters to the help program
- Returning a selected value
5Example of 3270 field help
6Web Field Help Example
7Web Field Help Example
- Field with discrete values
8Web Field Help Example
- Field definition with search criteria for a table
9Web Field Help Example
- Browse of selectable table values
10Selecting Help Opening a Window
- lta href""
- target"p8EPODIRM"
- tabindex"-1"
- title"Help for Employee Privacy Code"
- onclick"window.open(
- 'uwohfddv',
- 'p8EPODIRM',
- 'resizable,scrollbars,width400,height400')
- return false"gt
- Privacy Code ltbr /gt(for directory)lt/agt
11Passing Parameters In
- onclick"window.open(
- 'uwohfddv?pAAHR
- pFldEMP-PRIVACY-CD
- wFmwebForm
- wFldEMP_PRIVACY_CD',
- 'p8EPODIRM',
- resizable,scrollbars,width400,height400')
- return false"
12Returning a Selected Value
- ltscript language'JavaScript'gt
- lt!-- Begin
- function setVC (dVal) // Set opener Value and
Close - opener.document.webForm.EMP_PRIVACY_CD.valuedV
al - window.close()
-
- // End --gt
- lt/scriptgt
lta href'' title'Choose this entry'
onClick'setVC("1") return false'gt1lt/agt
13Field Help Summary
- Using JavaScript and the DOM
- Invoke help lta
- Open a window onclickwindow.open(
- Pass parameters program?parmvalue
- Select a value lta
- Return the value opener.document.form.field.value
142. Selecting Data
- Browse-Select user interface
- Web examples
- Solution
- Hidden form fields
- Entry selection
- Field assignment
15Browse of Purchase Orders
- Action selected to view invoices for the selected
PO
16Browse of Invoices for a PO
- Action selected to view the invoice data
17View of Invoice Data
18Hidden Form Fields
- HTML form fields are needed to pass selection
identifiers to the next program - These fields are behind the scene since the user
is not keying values into them
ltinput type"hidden" name"PO_NO"gt
19Entry Selection
- Once again we use a null link to execute a
JavaScript function
lta href'' tabindex'1' title'Choose
this entry' onClick'setVS(1) return
false'gt6001260lt/agt
20Field Assignment
- JavaScript assigns the hidden form field and
submits the form
function setVS (le_x) // Set Value and Submit
listEl1 new Array() listEl11"6001260"
listEl12"6001264" document.webForm.PO_NO.
valuelistEl1le_x document.webForm.actionReq
.value"Execute" document.webForm.submit()
21Selecting Data Summary
- Hidden form fields
- ltinput typehidden
- Entry selection
- lta onclick
- Hidden field assignment document.form.field.value
- Form submission document.form.submit()
223. The BACK Button
- The issue state on the mainframe really is
meaningless if the user can interact from any
prior page - Web example
- Solution maintain minimum state information
within each page via hidden fields - First/Last ISN and occurrence for paging
- Program stack for return
23Browse all Services by Key Word
24Browse Invoices Search Criteria
25Browse Invoices for Vendor
26Back twice, then Page Back
27First/Last ISN and Occurrence
- Using these we access the first/last record to
restore our search key values and then page
(read) forward or backward
ltinput type"hidden" name"FirstISNOcc"
value"734.000"gt ltinput type"hidden"
name"LastISNOcc" value"738.000"gt
28Program Stack, Titles
- List of menus/functions visited
ltinput type"hidden" name"title_rs1"
value"Main Menu"gt ltinput type"hidden"
name"title_rs2" value"Purchasing/Payab
les Menu"gt ltinput type"hidden"
name"title_rs3" value"Purchase Orders"gt
29Program Stack, Program Names
- Natural program names for those functions and the
action and search type selected (retained as
index values)
ltinput type"hidden" name"psPrgmID"
value"UWOMENUH11UWOMENUH11UPOBPO 21"gt
30Program Stack, First ISN per Level
- ISN and occurrence of the first record displayed
at each level (the occurrence is only retained
when necessary, negative values indicate page
back was allowed)
ltinput type"hidden" name"psFirstISN"
value"510-734"gt
31BACK Button Summary
- Maintain state information within each page via
hidden fields - For our browse models
- First and last ISN occurrence
- Info for each level (menu hierarchy)
- Title
- Program with action and search type
- First ISN occurrence
324. Stateless Browsing (ADABAS)
- No active loop required
- Thanks to STARTING WITH ISN
- Backward browsing
- Thanks to READ/HISTOGRAM IN VARIABLE DIRECTION
- Descriptor types
- Regular descriptors
- MU descriptors
- Unique PE descriptors
33Regular Descriptor, Search Value
- Search value (key) definition
DBV Search key for Search Type VEND 1 SK-VEND
2 VENDOR-NO
(P6) 2 DATE-ORDER-EFFECTIVE
(D) 1 REDEFINE SK-VEND
2 SK-VEND (B8)
34Regular Descriptor, Restore Keys
- GET and MOVE BY NAME used to restore the search
key after a paging request
GET DBV START-ISN / Get the previous
/ first/last
record MOVE BY NAME DBV TO SK-VEND / Pull its
starting key
35Regular Descriptor, Read
- Data base READ and subsequent check for the same
vendor
RVEND. READ DBV IN VARIABLE DIRECTION BY
VENDOR-DATE-KEY SK-VEND STARTING WITH ISN
START-ISN IF DBV.VENDOR-NO NE
SK-VEND.VENDOR-NO / So we don't page across
high order keys ESCAPE BOTTOM END-IF
36MU Descriptor, Search Value
- Search value (key) definition for our Browse all
Services - Applicable to super descriptors composed from an
MU or elementary MU fields
DBV Search key for Search Type 3 - KEYW 1
SK-KEYW 2
ACCESS-GROUP-CD (A4) 2
MENU-KEYWORD (A12)
1 REDEFINE SK-KEYW 2
SK-KEYW (A16)
37MU Descriptor, View
- Use HISTOGRAM READ because
- With READ alone you do not know which descriptor
value (occurrence) was used to access the record - You cannot use HISTOGRAM and FIND because there
is no FIND DESCENDING
1 HKEYWV VIEW OF WEB-MENU 2
ACCESS-KEYWORD-KEY (1) 2 REDEFINE
ACCESS-KEYWORD-KEY 3 ACCESS-GROUP-CD
(A4) 3 MENU-KEYWORD (A12)
38MU Descriptor, Restore Keys
- Statements to restore the search key after a
paging request (with the occurrence reference)
GET DBV START-ISN / get the previous
/ first/last record
SK-KEYW.MENU-KEYWORD / and pull its starting
key DBV.MENU-KEYWORD(START-OCC)
39MU Descriptor, Histogram
- HISTOGRAM to obtain the key word values
/ Set the fixed access group SK-KEYW.ACCESS-GROU
P-CD WSI.ACCESS-GROUP-CD / Histogram
to get the keywords
HKEYW.
HISTOGRAM HKEYWV IN VARIABLE DIRECTION
FOR ACCESS-KEYWORD-KEY FROM SK-KEYW IF
HKEYWV.ACCESS-GROUP-CD NE
SK-KEYW.ACCESS-GROUP-CD ESCAPE BOTTOM
(HKEYW.) END-IF
40MU Descriptor, Starting ISN
- The READ may be a continuation only for the 1st
descriptor value
IF COUNTER(HKEYW.) GT 1
/ Only restrict the records in the
READ for the / first key obtained RESET
START-ISN / Will be ignored when used in
/ STARTING WITH ISN (descending
/ as well as ascending) END-IF
41MU Descriptor, Read
- Read the records with the descriptor value
/ Read the data
RKEYW.
READ DBV IN VARIABLE
DIRECTION WITH ACCESS-KEYWORD-KEY
HKEYWV.ACCESS-KEYWORD-KEY(1) STARTING WITH
ISN START-ISN IF NOT HKEYWV.MENU-KEYWORD
DBV.MENU-KEYWORD() ESCAPE BOTTOM
END-IF
42MU Descriptor, Wrap Around
- Do not report the same record twice when adjacent
keywords exist within the same record
IF NOT HKEYWV.MENU-KEYWORD DBV.MENU-KEYWORD()
/ Ensure we don't cycle around
or (DIRECTION 'A'
AND ISN(RKEYW.) LE START-ISN)
OR (DIRECTION 'D' AND START-ISN NE
0 AND
ISN(RKEYW.) GE START-ISN) ESCAPE
BOTTOM END-IF
START-ISN ISN(RKEYW.)
43PE Descriptor
- You cannot page back (without wasted I/O) in a
stateless environment with a non-unique PE type
descriptor without FIND DESCENDING - See enhancement proposal 958 on Quest or
Servline24 and add your comments
44Unique PE Descriptor, Search Key
DBV Search key for Search Type RACT 1
SK-RACT 2
REVIEWER-DESK-ID (A8) 2
RPI (L) INIT ltTRUEgt 2
APPLICATION-ID (A8) 2
COMMAND-ID (A4) 2
TIME-TXN-REQUESTED (T) 1
REDEFINE SK-RACT 2
SK-RACT (A28)
45Unique PE Descriptor, View
- HISTOGRAM view to obtain the descriptor values
HGV for PE type descriptor 1 HGV
VIEW OF TARGET-TXN 2
REV-RPI-ACMD-TRTIME-KEY
2 REDEFINE REV-RPI-ACMD-TRTIME-KEY
3 REVIEWER-DESK-ID (A8)
3 RPI (L)
3 APPLICATION-ID (A8)
3 COMMAND-ID (A4)
3 TIME-TXN-REQUESTED (T)
46Unique PE Descriptor, Restore Keys
- Statements to restore the search key after a
paging request
GET DBV START-ISN / get the previous
/ first/last record MOVE
DBV.APPLICATION-ID TO SK-RACT.APPLICATION-ID
MOVE DBV.COMMAND-ID TO
SK-RACT.COMMAND-ID MOVE
DBV.REVIEWER-DESK-ID(START-OCC) TO
SK-RACT.REVIEWER-DESK-ID MOVE DBV.TIME-TXN-REQUEST
ED TO SK-RACT.TIME-TXN-REQUESTED
47Unique PE Descriptor, Histogram
- HISTOGRAM to obtain the PE descriptor values
HRACT.
HISTOGRAM HGV IN VARIABLE DIRECTION
FOR REV-RPI-ACMD-TRTIME-KEY
STARTING WITH SK-RACT
IF HGV.REVIEWER-DESK-ID NE
SK-RACT.REVIEWER-DESK-ID ESCAPE BOTTOM
(HRACT.) END-IF
48Unique PE Descriptor, FIND
- FIND the record with the unique descriptor value
/ Treat this descriptor as if it is unique
FRACT.
FIND (1) DBV WITH
REV-RPI-ACMD-TRTIME-KEY
HGV.REV-RPI-ACMD-TRTIME-KEY
END-FIND
49Stateless Browsing Summary
- Thanks to READ/HISTOGRAM DESCENDING and
STARTING WITH ISN we have efficient forward and
backward browsing of ADABAS - Regular descriptors, MU type descriptors, and
Unique PE type descriptors - Enhancement needed for non-unique PE type
descriptors (proposal 958) - FIND DESCENDING
50Presentation Summary
- Techniques for
- Implementing field help,
- Selecting data,
- Working with the browser BACK button, and
- Stateless forward and backward browsing of ADABAS
files.
Thank You