1 / 50

Web Enablement: Challenges and Solutions http://www.uark.edu/basis/UAWEB/Challenges.html

Web Enablement: Challenges and Solutions http://www.uark.edu/basis/UAWEB/Challenges.html. David Wimberly University of Arkansas wdw@uark.edu. Web Enablement Challenges. Field help Selecting data Accommodating the browser Back button Stateless forward and backward browsing of ADABAS data.

filbert
Télécharger la présentation

Web Enablement: Challenges and Solutions http://www.uark.edu/basis/UAWEB/Challenges.html

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Web Enablement:Challenges and Solutionshttp://www.uark.edu/basis/UAWEB/Challenges.html David Wimberly University of Arkansas wdw@uark.edu

  2. Web Enablement Challenges • Field help • Selecting data • Accommodating the browser Back button • Stateless forward and backward browsing of ADABAS data

  3. Background • 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

  4. 1. 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

  5. Example of 3270 field help

  6. Web Field Help Example Field definition only

  7. Web Field Help Example Field with discrete values

  8. Web Field Help Example Field definition with search criteria for a table

  9. Web Field Help Example Browse of selectable table values

  10. Selecting Help & Opening a Window <a href="#" target="p8EPODIRM" tabindex="-1" title="Help for Employee Privacy Code" onclick="window.open( 'uwohfddv…', 'p8EPODIRM', 'resizable,scrollbars,width=400,height=400'); return false"> Privacy Code <br />(for directory)</a>

  11. Passing Parameters In onclick="window.open( 'uwohfddv?pAA=HR& pFld=EMP-PRIVACY-CD& wFm=webForm& wFld=EMP_PRIVACY_CD', 'p8EPODIRM', ‘resizable,scrollbars,width=400,height=400'); return false"

  12. Returning a Selected Value <script language='JavaScript'> <!-- Begin function setVC (dVal) { // Set opener Value and Close opener.document.webForm.EMP_PRIVACY_CD.value=dVal; window.close(); } // End --> </script> <a href='#' title='Choose this entry' onClick='setVC("1"); return false'>1</a>

  13. Field Help Summary Using JavaScript and the DOM • Invoke help: <a … • Open a window: onclick=“window.open(… • Pass parameters: program?parm=value • Select a value: <a … • Return the value: opener.document.form.field.value=…

  14. 2. Selecting Data • Browse-Select user interface • Web examples • Solution • Hidden form fields • Entry selection • Field assignment

  15. Browse of Purchase Orders • Action selected to view invoices for the selected PO

  16. Browse of Invoices for a PO • Action selected to view the invoice data

  17. View of Invoice Data

  18. Hidden 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 <input type="hidden" name="PO_NO">

  19. Entry Selection • Once again we use a null link to execute a JavaScript function <a href='#' tabindex='1' title='Choose this entry' onClick='setVS(1); return false'>6001260</a>

  20. Field Assignment • JavaScript assigns the hidden form field and submits the form function setVS (le_x) { // Set Value and Submit listEl1 = new Array(); listEl1[1]="6001260"; listEl1[2]="6001264"; document.webForm.PO_NO.value=listEl1[le_x]; document.webForm.actionReq.value="Execute"; document.webForm.submit(); }

  21. Selecting Data Summary • Hidden form fields: <input type=“hidden” … • Entry selection: <a … onclick=… • Hidden field assignment: document.form.field.value=… • Form submission: document.form.submit();

  22. 3. 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’

  23. Browse all Services by Key Word

  24. Browse Invoices Search Criteria

  25. Browse Invoices for Vendor

  26. Back twice, then ‘Page Back’

  27. First/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 <input type="hidden" name="FirstISNOcc" value="734.000"> <input type="hidden" name="LastISNOcc" value="738.000">

  28. Program Stack, Titles • List of menus/functions visited <input type="hidden" name="title_rs1" value="Main Menu"> <input type="hidden" name="title_rs2" value="Purchasing/Payables Menu"> <input type="hidden" name="title_rs3" value="Purchase Orders">

  29. Program Stack, Program Names • Natural program names for those functions and the action and search type selected (retained as index values) <input type="hidden" name="psPrgmID" value="UWOMENUH11;UWOMENUH11;UPOBPO 21;">

  30. Program 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) <input type="hidden" name="psFirstISN" value="5;10;-734;">

  31. BACK 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

  32. 4. 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

  33. Regular 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)

  34. Regular 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

  35. Regular 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

  36. MU 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)

  37. MU 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)

  38. MU 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)

  39. MU Descriptor, Histogram • HISTOGRAM to obtain the key word values /* Set the fixed access group SK-KEYW.#ACCESS-GROUP-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

  40. MU 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

  41. MU 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

  42. MU 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.)

  43. PE 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

  44. Unique PE Descriptor, Search Key • Search value definition * DBV Search key for Search Type RACT 1 SK-RACT 2 REVIEWER-DESK-ID (A8) 2 #RPI (L) INIT <TRUE> 2 APPLICATION-ID (A8) 2 COMMAND-ID (A4) 2 TIME-TXN-REQUESTED (T) 1 REDEFINE SK-RACT 2 #SK-RACT (A28)

  45. Unique 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)

  46. Unique 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-REQUESTED TO SK-RACT.TIME-TXN-REQUESTED

  47. Unique 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

  48. Unique 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 …

  49. Stateless 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

  50. Presentation 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

More Related