home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pds.zip / PDEDIT.PNL < prev    next >
Text File  |  1994-02-27  |  36KB  |  778 lines

  1. )PANEL NAME=PANEL000 CLS=Y
  2. )COLORS INPUT=GREENHI OUTPUT=YELLOWHI TEXT=WHITEHI
  3.  HSS/PDS EDIT                                                       CC 0000 0000
  4.  COMMAND ===>                                                  +SCROLL ===>     +
  5. )END )NOWAIT )NODISPLAY
  6.  
  7. )PANEL NAME=PANEL001 CLS=N AID=(ZENTER,ZENTER_KPAD,ZF1,ZPGUP,ZPGDW)
  8. )XID ZESC
  9. )REM )XID ZESC ZF3 ZF4_A ZHOME
  10. )AID ZF3_A ZF4_A
  11. )AID Z_D_A Z_I_A Z_R_A Z_J_A Z_T_A Z_S_A
  12. )AID ZPGUP_C ZPGDW_C ZF2 ZF3 ZF4 ZF5 ZF6 ZF10 ZF11
  13. )REM )AID ZARRWUP ZARRWDOWN
  14. )VARS sGlobal.iCCBeg sGlobal.iCCEnd
  15. )COLORS INPUT=GREENHI OUTPUT=YELLOWHI TEXT=WHITEHI
  16. )ROW 01 15 FLDS="%sFlSpec                                      +"
  17. )ROW 01 72 FLDS="%*  +%*  +"
  18. )ROW 02 15 FLDS="_ZCMD                                            +"
  19. )ROW 02 77 FLDS="_ZAMT+"
  20. )ROW 3
  21. _sPDRec.1                                                                       +
  22. _sPDRec.2                                                                       +
  23. _sPDRec.3                                                                       +
  24. _sPDRec.4                                                                       +
  25. _sPDRec.5                                                                       +
  26. _sPDRec.6                                                                       +
  27. _sPDRec.7                                                                       +
  28. _sPDRec.8                                                                       +
  29. _sPDRec.9                                                                       +
  30. _sPDRec.10                                                                      +
  31. _sPDRec.11                                                                      +
  32. _sPDRec.12                                                                      +
  33. _sPDRec.13                                                                      +
  34. _sPDRec.14                                                                      +
  35. _sPDRec.15                                                                      +
  36. _sPDRec.16                                                                      +
  37. _sPDRec.17                                                                      +
  38. _sPDRec.18                                                                      +
  39. _sPDRec.19                                                                      +
  40. _sPDRec.20                                                                      +
  41. _sPDRec.21                                                                      +
  42. _sPDRec.22                                                                      +
  43. )PROC
  44.   /* The following defines just those AID keys this )PROC needs here */
  45.   Call rxPDZVarDefine 'ZPGUP', 'ZPGDW'
  46.  
  47.   /* Test for the "PGUP" key */
  48.   if ZKey = ZPGUP | ZKey = ZPGDW then
  49.    do
  50.     return ZKey
  51.    end
  52.  
  53.   /* The following defines the possible return codes */
  54.   Call rxPDZVarDefine 'ZVERIFYPROC_RC_NORETURN'
  55.  
  56.   /* The following defines the additional AID keys */
  57.   Call rxPDZVarDefine 'ZENTER', 'ZENTER_KPAD', 'ZF1'
  58.  
  59.   /* Test for the "F1" key */
  60.   if ZKey = ZF1 then
  61.    do
  62.     Call rxPDZVarDefine 'ZF4_A'
  63.     svid = rxPDSaveScreen(ZBid)
  64.     akey = ZENTER
  65.     sHelpTitle = CENTER('EDIT Help',66)
  66.     do while akey = ZENTER
  67.      sOverVu    = '_'
  68.      sPrimCmds  = '_'
  69.      sFKeys     = '_'
  70.      sRows      = '_'
  71.      akey = rxPDDisplay(zBID,'PUPHLP01')
  72.     end /* do while akey = ZENTER */
  73.     rc = rxPDRestoreScreen(ZBid,svid)
  74.     if akey = ZF4_A then return akey
  75.     return ZVERIFYPROC_RC_NORETURN
  76.    end
  77.  
  78.   /* May be Enter or the KPAD_ENTER */
  79.   if ZKey = ZENTER | ZKey = ZENTER_KPAD then
  80.    do
  81.     return ZENTER
  82.    end
  83.  
  84.   /* Must be one of the other AID keys */
  85.   return ZKEY
  86. )END )BLANK
  87.  
  88. )PANEL NAME=PANELXSYSTEM CLS=N
  89. )COLORS INPUT=GREENHI OUTPUT=YELLOWHI TEXT=WHITEHI
  90.  HSS/PDS
  91. )END )NOWAIT FLDS="        X SYSTEM                                                             "
  92.  
  93. )PANEL NAME=PUPDELETEERR XID=(ZESC)
  94. )COLORS TEXT=REDHI
  95. )ROW 22 08 FLDS="╔═════════════════════════════════════════════════════════════╗"
  96. )ROW 23 08 FLDS="║   Unable to delete TSD file %sFlSpec                       +║"
  97. )ROW 24 08 FLDS="╚═════════════════════════════════════════════════════════════╝"
  98. )END )BLANK FLDS="<Press ESC to end or F3 to quit>"
  99.  
  100. )PANEL NAME=PUPOPENERR XID=(ZESC)
  101. )COLORS TEXT=REDHI
  102. )ROW 22 08 FLDS="╔═════════════════════════════════════════════════════════════╗"
  103. )ROW 23 08 FLDS="║   Unable to open TSD file %sFlSpec                         +║"
  104. )ROW 24 08 FLDS="╚═════════════════════════════════════════════════════════════╝"
  105. )END )BLANK FLDS="<Press ESC to end or F3 to quit>"
  106.  
  107. )PANEL NAME=PUPWRITEERR XID=(ZESC)
  108. )COLORS TEXT=REDHI
  109. )ROW 22 08 FLDS="╔═════════════════════════════════════════════════════════════╗"
  110. )ROW 23 08 FLDS="║   Error writing TSD file %sFlSpec                          +║"
  111. )ROW 24 08 FLDS="╚═════════════════════════════════════════════════════════════╝"
  112. )END )BLANK FLDS="<Press ESC to end or F3 to quit>"
  113.  
  114. )PANEL NAME=PUPHLP01 XID=(ZESC,ZF3,ZF4_A) AID=(ZENTER)
  115. )COLORS TEXT=RED INPUT=WHITEHI OUTPUT=WHITEHI
  116. )VARS sOverVu sPrimCmds sFKeys sRows
  117. )ROW 05 06 FLDS="╔═══════════════════════════════════════════════════════════════════╗"
  118. )ROW 06 06 FLDS="║ %sHelpTitle                                                      +║"
  119. )ROW 07 06 FLDS="║   Select one or more of the following topics:                     ║"
  120. )ROW 08 06 FLDS="║   _+Overview of the PDS Editor Sample.                            ║"
  121. )ROW 09 06 FLDS="║   _+Primary Commands.                                             ║"
  122. )ROW 10 06 FLDS="║   _+Function Keys and Command Keys.                               ║"
  123. )ROW 11 06 FLDS="║   _+Manipulating the rows and the data in the rows.               ║"
  124. )ROW 12 06 FLDS="║                                                                   ║"
  125. )ROW 13 06 FLDS="╚═══════════════════════════════════════════════════════════════════╝"
  126. )PROC
  127.   Call rxPDZVarDefine 'ZENTER', 'ZESC', 'ZF4_A', 'ZF3'
  128.  
  129.   /* The following defines the possible return codes */
  130.   Call rxPDZVarDefine 'ZVERIFYPROC_RC_NORETURN'
  131.  
  132.   if sOverVu = '_' & sPrimCmds = '_' & sFKeys = '_' & sRows = '_' then
  133.    do
  134.     select
  135.      when ZFName = 'sOverVu' then
  136.       do
  137.        sOverVu = 'S'
  138.       end
  139.      when ZFName = 'sPrimCmds' then
  140.       do
  141.        sPrimCmds = 'S'
  142.       end
  143.      when ZFName = 'sRows' then
  144.       do
  145.        sRows = 'S'
  146.       end
  147.      when ZFName = 'sFKeys' then
  148.       do
  149.        sFKeys = 'S'
  150.       end
  151.      otherwise
  152.       do
  153.        return ZVERIFYPROC_RC_NORETURN
  154.       end
  155.     end /* End of select */
  156.    end
  157.   svid = rxPDSaveScreen(ZBid)
  158.   if sOverVu <> '_' then
  159.    do
  160.     sHelpTitle = CENTER('Overview of the PDS Editor Sample.',60)
  161.     akey = ZENTER
  162.     iOV = 1
  163.     iOVMax = 4
  164.     do while akey = ZENTER & iOV <= iOVMax
  165.      akey = rxPDDisplay(zBID,'PUPOVRVU'iOV)
  166.      iOV=iOV+1
  167.     end /* do while akey = ZENTER */
  168.     if akey = ZF3 | akey = ZF4_A then
  169.      do
  170.       Call rxPDSetCursorFld ZBid, ZPName, 'sOverVu'
  171.       rc = rxPDRestoreScreen(ZBid,svid)
  172.       return akey
  173.      end
  174.     Call rxPDSetCursorFld ZBid, ZPName, 'sOverVu'
  175.    end
  176.   if sPrimCmds <> '_' then
  177.    do
  178.     sHelpTitle = CENTER('Primary Commands.',60)
  179.     akey = ZENTER
  180.     do while akey = ZENTER
  181.      sCancel    = '_'
  182.      sEnd       = '_'
  183.      sDelete    = '_'
  184.      sInsert    = '_'
  185.      sRepeat    = '_'
  186.      sFind      = '_'
  187.      sChange    = '_'
  188.      sLocate    = '_'
  189.      akey = rxPDDisplay(zBID,'PUPPCMDS1')
  190.     end /* do while akey = ZENTER */
  191.     if akey = ZF3 | akey = ZF4_A then
  192.      do
  193.       Call rxPDSetCursorFld ZBid, ZPName, 'sOverVu'
  194.       rc = rxPDRestoreScreen(ZBid,svid)
  195.       return akey
  196.      end
  197.     Call rxPDSetCursorFld ZBid, ZPName, 'sPrimCmds'
  198.    end
  199.   if sFKeys <> '_' then
  200.    do
  201.     sHelpTitle = CENTER('Function keys and Command keys.',60)
  202.     akey = ZENTER
  203.     iFK = 1
  204.     iFKMax = 3
  205.     do while akey = ZENTER & iFK <= iFKMax
  206.      sF1        = 'F1'
  207.      sF2        = 'F2'
  208.      sF3        = 'F3'
  209.      sF4        = 'F4'
  210.      sF10       = 'F10'
  211.      sF11       = 'F11'
  212.      sF4A       = 'Alt_F4'
  213.      sPGUP      = 'PGUP'
  214.      sPGDW      = 'PGDW'
  215.      sENTER     = 'ENTER'
  216.      sTA        = 'Alt_T'
  217.      sIA        = 'Alt_I'
  218.      sRA        = 'Alt_R'
  219.      sDA        = 'Alt_D'
  220.      sJA        = 'Alt_J'
  221.      sSA        = 'Alt_S'
  222.      akey = rxPDDisplay(zBID,'PUPFKEYS'iFK)
  223.      iFK=iFK+1
  224.     end /* do while akey = ZENTER */
  225.     if akey = ZF3 | akey = ZF4_A then
  226.      do
  227.       Call rxPDSetCursorFld ZBid, ZPName, 'sOverVu'
  228.       rc = rxPDRestoreScreen(ZBid,svid)
  229.       return akey
  230.      end
  231.     Call rxPDSetCursorFld ZBid, ZPName, 'sFKeys'
  232.    end
  233.   if sRows   <> '_' then
  234.    do
  235.     sHelpTitle = CENTER('Manipulating the rows and the data in the rows.',60)
  236.     akey = ZENTER
  237.     do while akey = ZENTER
  238.      sPage      = '_'
  239.      sEdit      = '_'
  240.      sDelete    = '_'
  241.      sInsert    = '_'
  242.      sRepeat    = '_'
  243.      akey = rxPDDisplay(zBID,'PUPROWS01')
  244.     end /* do while akey = ZENTER */
  245.     if akey = ZF3 | akey = ZF4_A then
  246.      do
  247.       Call rxPDSetCursorFld ZBid, ZPName, 'sOverVu'
  248.       rc = rxPDRestoreScreen(ZBid,svid)
  249.       return akey
  250.      end
  251.     Call rxPDSetCursorFld ZBid, ZPName, 'sRows'
  252.    end
  253.   rc = rxPDRestoreScreen(ZBid,svid)
  254.   if akey = ZESC then akey = ZENTER
  255.   return akey
  256. )END )BLANK FLDS="<Press ESC to end, F3 to quit or ENTER to select topic>"
  257.  
  258. )PANEL NAME=PUPOVRVU1 XID=(ZESC,ZF3,ZF4_A) AID=(ZENTER)
  259. )COLORS TEXT=RED INPUT=WHITEHI OUTPUT=WHITEHI
  260. )ROW 07 11 FLDS="╔════════════════════════════════════════════════════════════╗"
  261. )ROW 08 11 FLDS="║ %sHelpTitle                                               +║"
  262. )ROW 09 11 FLDS="║                                                            ║"
  263. )ROW 10 11 FLDS="║   The PDEDIT.CMD file is a sample editor, written in REXX, ║"
  264. )ROW 11 11 FLDS="║   which uses the 'Panel Display System' shareware product. ║"
  265. )ROW 12 11 FLDS="║                                                            ║"
  266. )ROW 13 11 FLDS="║   It demonstrates the use of most of the PD system's REXX  ║"
  267. )ROW 14 11 FLDS="║   application interface known as the 'rxPD' interface.     ║"
  268. )ROW 15 11 FLDS="║                                                            ║"
  269. )ROW 16 11 FLDS="╚════════════════════════════════════════════════════════════╝"
  270. )COLORS TEXT=REDHI
  271. )ROW 15 65 FLDS="<more>"
  272. )COLORS TEXT=RED
  273. )END )BLANK FLDS="<Press ESC to end, F3 to quit or ENTER to see more>"
  274.  
  275. )PANEL NAME=PUPOVRVU2 XID=(ZESC,ZF3,ZF4_A) AID=(ZENTER)
  276. )COLORS TEXT=RED INPUT=WHITEHI OUTPUT=WHITEHI
  277. )ROW 07 11 FLDS="╔════════════════════════════════════════════════════════════╗"
  278. )ROW 08 11 FLDS="║ %sHelpTitle                                               +║"
  279. )ROW 09 11 FLDS="║                                                            ║"
  280. )ROW 10 11 FLDS="║   This sample makes use of composite panels, popup panels, ║"
  281. )ROW 11 11 FLDS="║   function keys, command keys and the power of REXX to     ║"
  282. )ROW 12 11 FLDS="║   implement many of the functions required of an editor.   ║"
  283. )ROW 13 11 FLDS="║                                                            ║"
  284. )ROW 14 11 FLDS="║                                                            ║"
  285. )ROW 15 11 FLDS="║                                                            ║"
  286. )ROW 16 11 FLDS="╚════════════════════════════════════════════════════════════╝"
  287. )COLORS TEXT=REDHI
  288. )ROW 15 65 FLDS="<more>"
  289. )COLORS TEXT=RED
  290. )END )BLANK FLDS="<Press ESC to end, F3 to quit or ENTER to see more>"
  291.  
  292. )PANEL NAME=PUPOVRVU3 XID=(ZESC,ZF3,ZF4_A) AID=(ZENTER)
  293. )COLORS TEXT=RED INPUT=WHITEHI OUTPUT=WHITEHI
  294. )ROW 07 11 FLDS="╔════════════════════════════════════════════════════════════╗"
  295. )ROW 08 11 FLDS="║ %sHelpTitle                                               +║"
  296. )ROW 09 11 FLDS="║                                                            ║"
  297. )ROW 10 11 FLDS="║   Some of the functions are 'Insert', 'Delete', 'Repeat',  ║"
  298. )ROW 11 11 FLDS="║   'Split', 'Join' and of course the ability to modify a    ║"
  299. )ROW 12 11 FLDS="║   row.                                                     ║"
  300. )ROW 13 11 FLDS="║                                                            ║"
  301. )ROW 14 11 FLDS="║   You can also scroll up, down, left and right thru the    ║"
  302. )ROW 15 11 FLDS="║   file.                                                    ║"
  303. )ROW 16 11 FLDS="╚════════════════════════════════════════════════════════════╝"
  304. )COLORS TEXT=REDHI
  305. )ROW 15 65 FLDS="<more>"
  306. )COLORS TEXT=RED
  307. )END )BLANK FLDS="<Press ESC to end, F3 to quit or ENTER to see more>"
  308.  
  309. )PANEL NAME=PUPOVRVU4 XID=(ZESC,ZF3,ZF4_A) AID=(ZENTER)
  310. )COLORS TEXT=RED INPUT=WHITEHI OUTPUT=WHITEHI
  311. )ROW 07 11 FLDS="╔════════════════════════════════════════════════════════════╗"
  312. )ROW 08 11 FLDS="║ %sHelpTitle                                               +║"
  313. )ROW 09 11 FLDS="║                                                            ║"
  314. )ROW 10 11 FLDS="║   This is a functioning editor! Modifications to the rows  ║"
  315. )ROW 11 11 FLDS="║   of the display will automatically be written to the file ║"
  316. )ROW 12 11 FLDS="║   when you exit the editor!                                ║"
  317. )ROW 13 11 FLDS="║                                                            ║"
  318. )ROW 14 11 FLDS="║   You can cancel all modifications to the file with the    ║"
  319. )ROW 15 11 FLDS="║   'CANCEL' command.                                        ║"
  320. )ROW 16 11 FLDS="╚════════════════════════════════════════════════════════════╝"
  321. )COLORS TEXT=REDHI
  322. )REM )ROW 15 65 FLDS="<more>"
  323. )COLORS TEXT=RED
  324. )END )BLANK FLDS="<Press ESC to end or F3 to quit>"
  325.  
  326. )PANEL NAME=PUPPCMDS1 XID=(ZESC,ZF3,ZF4_A) AID=(ZENTER)
  327. )COLORS TEXT=RED INPUT=WHITEHI OUTPUT=WHITEHI
  328. )VARS sCancel sEnd sDelete sInsert sRepeat sLocate
  329. )ROW 07 11 FLDS="╔════════════════════════════════════════════════════════════╗"
  330. )ROW 08 11 FLDS="║ %sHelpTitle                                               +║"
  331. )ROW 09 11 FLDS="║   Select one or more of the following topics:              ║"
  332. )ROW 10 11 FLDS="║   _+Cancel all modifications and exit the editor.          ║"
  333. )ROW 11 11 FLDS="║   _+Save any modifications and exit the editor.            ║"
  334. )ROW 12 11 FLDS="║   _+Delete a row.                                          ║"
  335. )ROW 13 11 FLDS="║   _+Insert a row.                                          ║"
  336. )ROW 14 11 FLDS="║   _+Repeat a row.                                          ║"
  337. )ROW 15 11 FLDS="║   _+Locate a row.                                          ║"
  338. )ROW 16 11 FLDS="╚════════════════════════════════════════════════════════════╝"
  339. )PROC
  340.   Call rxPDZVarDefine 'ZENTER', 'ZESC', 'ZF4_A', 'ZF3'
  341.  
  342.   /* The following defines the possible return codes */
  343.   Call rxPDZVarDefine 'ZVERIFYPROC_RC_NORETURN'
  344.  
  345.   if 0 = rxPDQueryMDT(ZBid,'PUPPCMDS1') then
  346.    do
  347.     select
  348.      when ZFName = 'sCancel' then
  349.       do
  350.        sCancel = 'S'
  351.       end
  352.      when ZFName = 'sEnd' then
  353.       do
  354.        sEnd = 'S'
  355.       end
  356.      when ZFName = 'sDelete' then
  357.       do
  358.        sDelete = 'S'
  359.       end
  360.      when ZFName = 'sInsert' then
  361.       do
  362.        sInsert = 'S'
  363.       end
  364.      when ZFName = 'sRepeat' then
  365.       do
  366.        sRepeat = 'S'
  367.       end
  368.      when ZFName = 'sLocate' then
  369.       do
  370.        sLocate = 'S'
  371.       end
  372.      otherwise
  373.       do
  374.        return ZVERIFYPROC_RC_NORETURN
  375.       end
  376.     end /* End of select */
  377.    end
  378.   svid = rxPDSaveScreen(ZBid)
  379.   if rxPDQueryMDT(ZBid,'PUPPCMDS1','sCancel') | sCancel = 'S' then
  380.    do
  381.     sHelpTitle=CENTER('Cancel all modifications and exit the editor.',60)
  382.     akey = rxPDDisplay(zBID,'PUPCANCEL1')
  383.     Call rxPDSetCursorFld ZBid, ZPName, 'sCancel'
  384.     if akey = ZF3 | akey = ZF4_A then
  385.      do
  386.       rc = rxPDRestoreScreen(ZBid,svid)
  387.       return akey
  388.      end
  389.    end
  390.   if rxPDQueryMDT(ZBid,'PUPPCMDS1','sEnd') | sEnd = 'S' then
  391.    do
  392.     sHelpTitle=CENTER('Save any modifications and exit the editor.',60)
  393.     akey = rxPDDisplay(zBID,'PUPEND1')
  394.     if akey = ZF3 | akey = ZF4_A then
  395.      do
  396.       Call rxPDSetCursorFld ZBid, ZPName, 'sCancel'
  397.       rc = rxPDRestoreScreen(ZBid,svid)
  398.       return akey
  399.      end
  400.     Call rxPDSetCursorFld ZBid, ZPName, 'sEnd'
  401.    end
  402.   if rxPDQueryMDT(ZBid,'PUPPCMDS1','sDelete') | sDelete = 'S' then
  403.    do
  404.     sHelpTitle=CENTER('Delete a row.',60)
  405.     akey = rxPDDisplay(zBID,'PUPDELETE02')
  406.     if akey = ZF3 | akey = ZF4_A then
  407.      do
  408.       Call rxPDSetCursorFld ZBid, ZPName, 'sCancel'
  409.       rc = rxPDRestoreScreen(ZBid,svid)
  410.       return akey
  411.      end
  412.     Call rxPDSetCursorFld ZBid, ZPName, 'sDelete'
  413.    end
  414.   if rxPDQueryMDT(ZBid,'PUPPCMDS1','sInsert') | sInsert = 'S' then
  415.    do
  416.     sHelpTitle=CENTER('Insert a row.',60)
  417.     akey = rxPDDisplay(zBID,'PUPINSERT02')
  418.     if akey = ZF3 | akey = ZF4_A then
  419.      do
  420.       Call rxPDSetCursorFld ZBid, ZPName, 'sCancel'
  421.       rc = rxPDRestoreScreen(ZBid,svid)
  422.       return akey
  423.      end
  424.     Call rxPDSetCursorFld ZBid, ZPName, 'sInsert'
  425.    end
  426.   if rxPDQueryMDT(ZBid,'PUPPCMDS1','sRepeat') | sRepeat = 'S' then
  427.    do
  428.     sHelpTitle=CENTER('Repeat a row.',60)
  429.     akey = rxPDDisplay(zBID,'PUPREPEAT02')
  430.     if akey = ZF3 | akey = ZF4_A then
  431.      do
  432.       Call rxPDSetCursorFld ZBid, ZPName, 'sCancel'
  433.       rc = rxPDRestoreScreen(ZBid,svid)
  434.       return akey
  435.      end
  436.     Call rxPDSetCursorFld ZBid, ZPName, 'sRepeat'
  437.    end
  438.   if rxPDQueryMDT(ZBid,'PUPPCMDS1','sLocate') | sLocate = 'S' then
  439.    do
  440.     sHelpTitle=CENTER('Locate a row.',60)
  441.     akey = rxPDDisplay(zBID,'PUPLOCATE01')
  442.     if akey = ZF3 | akey = ZF4_A then
  443.      do
  444.       Call rxPDSetCursorFld ZBid, ZPName, 'sCancel'
  445.       rc = rxPDRestoreScreen(ZBid,svid)
  446.       return akey
  447.      end
  448.     Call rxPDSetCursorFld ZBid, ZPName, 'sLocate'
  449.    end
  450.   rc = rxPDRestoreScreen(ZBid,svid)
  451.   if akey = ZESC then akey = ZENTER
  452.   return akey
  453. )END )BLANK FLDS="<Press ESC to end, F3 to quit or ENTER to select topic>"
  454.  
  455. )PANEL NAME=PUPFKEYS1 XID=(ZESC,ZF3,ZF4_A) AID=(ZENTER)
  456. )COLORS TEXT=RED INPUT=WHITEHI OUTPUT=WHITEHI
  457. )VARS sF1 sF2 sF3 sF4 sF10 sF11 sF4A
  458. )ROW 07 11 FLDS="╔════════════════════════════════════════════════════════════╗"
  459. )ROW 08 11 FLDS="║ %sHelpTitle                                               +║"
  460. )COLORS OUTPUT=REDHI
  461. )ROW 09 11 FLDS="║   %*    +- Display PDEDIT help.                            ║"
  462. )ROW 10 11 FLDS="║   %*    +- Split the row at the current cursor position.   ║"
  463. )ROW 11 11 FLDS="║   %*    +- Insert a row at the current cursor position.    ║"
  464. )ROW 12 11 FLDS="║   %*    +- Repeat the row at the current cursor position.  ║"
  465. )ROW 13 11 FLDS="║   %*    +- Scroll left thru the rows.                      ║"
  466. )ROW 14 11 FLDS="║   %*    +- Scroll right thru the rows.                     ║"
  467. )ROW 15 11 FLDS="║   %*    +- Save any modifications and exit PDEDIT.         ║"
  468. )ROW 16 11 FLDS="╚════════════════════════════════════════════════════════════╝"
  469. )COLORS TEXT=REDHI
  470. )ROW 15 65 FLDS="<more>"
  471. )COLORS TEXT=RED
  472. )END )BLANK FLDS="<Press ESC to end, F3 to quit or ENTER to see more>"
  473.  
  474. )PANEL NAME=PUPFKEYS2 XID=(ZESC,ZF3,ZF4_A) AID=(ZENTER)
  475. )COLORS TEXT=RED INPUT=WHITEHI OUTPUT=WHITEHI
  476. )VARS sPGUP sPGDW sENTER
  477. )ROW 07 11 FLDS="╔════════════════════════════════════════════════════════════╗"
  478. )ROW 08 11 FLDS="║ %sHelpTitle                                               +║"
  479. )COLORS OUTPUT=REDHI
  480. )ROW 09 11 FLDS="║                                                            ║"
  481. )ROW 10 11 FLDS="║   %*    +- Scroll up thru the rows.                        ║"
  482. )ROW 11 11 FLDS="║   %*    +- Scroll down thru the rows.                      ║"
  483. )ROW 12 11 FLDS="║   %*    +- Update any rows and/or execute a command.       ║"
  484. )ROW 13 11 FLDS="║                                                            ║"
  485. )ROW 14 11 FLDS="║                                                            ║"
  486. )ROW 15 11 FLDS="║                                                            ║"
  487. )ROW 16 11 FLDS="╚════════════════════════════════════════════════════════════╝"
  488. )COLORS TEXT=REDHI
  489. )ROW 15 65 FLDS="<more>"
  490. )COLORS TEXT=RED
  491. )END )BLANK FLDS="<Press ESC to end, F3 to quit or ENTER to see more>"
  492.  
  493. )PANEL NAME=PUPFKEYS3 XID=(ZESC,ZF3,ZF4_A) AID=(ZENTER)
  494. )COLORS TEXT=RED INPUT=WHITEHI OUTPUT=WHITEHI
  495. )VARS sTA sIA sRA sDA sJA sSA
  496. )ROW 07 11 FLDS="╔════════════════════════════════════════════════════════════╗"
  497. )ROW 08 11 FLDS="║ %sHelpTitle                                               +║"
  498. )COLORS OUTPUT=REDHI
  499. )ROW 09 11 FLDS="║   %*    +- Split the row at the current cursor position.   ║"
  500. )ROW 10 11 FLDS="║   %*    +- Insert a row at the current cursor position.    ║"
  501. )ROW 11 11 FLDS="║   %*    +- Repeat the row at the current cursor position   ║"
  502. )ROW 12 11 FLDS="║   %*    +- Delete the row at the current cursor position   ║"
  503. )ROW 13 11 FLDS="║   %*    +- Join the 2 rows at the current cursor position  ║"
  504. )ROW 14 11 FLDS="║   %*    +- Save any modifications to the file.             ║"
  505. )ROW 15 11 FLDS="║                                                            ║"
  506. )ROW 16 11 FLDS="╚════════════════════════════════════════════════════════════╝"
  507. )REM )COLORS TEXT=REDHI
  508. )REM )ROW 15 65 FLDS="<more>"
  509. )COLORS TEXT=RED
  510. )END )BLANK FLDS="<Press ESC to end or F3 to quit>"
  511.  
  512. )PANEL NAME=PUPCANCEL1 XID=(ZESC,ZF4_A,ZF3,ZENTER)
  513. )COLORS TEXT=RED INPUT=WHITEHI OUTPUT=WHITEHI
  514. )ROW 09 16 FLDS="╔═════════════════════════════════════════════════════════════╗"
  515. )ROW 10 16 FLDS="║ %sHelpTitle                                                +║"
  516. )ROW 11 16 FLDS="║   You can cancel any modifications you have made to the file║"
  517. )ROW 12 16 FLDS="║   and exit the PDS Editor with the 'CANCEL' command.        ║"
  518. )ROW 13 16 FLDS="║                                                             ║"
  519. )ROW 14 16 FLDS="║   The command can be abbreviated to 'CAN'.                  ║"
  520. )ROW 15 16 FLDS="║                                                             ║"
  521. )ROW 16 16 FLDS="║                                                             ║"
  522. )ROW 17 16 FLDS="║                                                             ║"
  523. )ROW 18 16 FLDS="╚═════════════════════════════════════════════════════════════╝"
  524. )END )BLANK FLDS="<Press ESC to end or F3 to quit>"
  525.  
  526. )PANEL NAME=PUPEND1 XID=(ZESC,ZF4_A,ZF3,ZENTER)
  527. )COLORS TEXT=RED INPUT=WHITEHI OUTPUT=WHITEHI
  528. )ROW 09 16 FLDS="╔═════════════════════════════════════════════════════════════╗"
  529. )ROW 10 16 FLDS="║ %sHelpTitle                                                +║"
  530. )ROW 11 16 FLDS="║   You save any modifications you have made to the file and  ║"
  531. )ROW 12 16 FLDS="║   exit the PDS Editor with the 'END' command.               ║"
  532. )ROW 13 16 FLDS="║                                                             ║"
  533. )ROW 14 16 FLDS="║   There isn't any abbreviation for the 'END' command.       ║"
  534. )ROW 15 16 FLDS="║                                                             ║"
  535. )ROW 16 16 FLDS="║                                                             ║"
  536. )ROW 17 16 FLDS="║                                                             ║"
  537. )ROW 18 16 FLDS="╚═════════════════════════════════════════════════════════════╝"
  538. )END )BLANK FLDS="<Press ESC to end or F3 to quit>"
  539.  
  540. )PANEL NAME=PUPROWS01 XID=(ZESC,ZF3,ZF4_A) AID=(ZENTER)
  541. )COLORS TEXT=RED INPUT=WHITEHI OUTPUT=WHITEHI
  542. )VARS sPage sEdit sDelete sInsert sRepeat
  543. )ROW 07 11 FLDS="╔════════════════════════════════════════════════════════════╗"
  544. )ROW 08 11 FLDS="║ %sHelpTitle                                               +║"
  545. )ROW 09 11 FLDS="║   Select one or more of the following topics:              ║"
  546. )ROW 10 11 FLDS="║   _+Scrolling the rows by cursor position.                 ║"
  547. )ROW 11 11 FLDS="║   _+Modify the data in a row.                              ║"
  548. )ROW 12 11 FLDS="║   _+Delete a row.                                          ║"
  549. )ROW 13 11 FLDS="║   _+Insert a row.                                          ║"
  550. )ROW 14 11 FLDS="║   _+Repeat a row.                                          ║"
  551. )ROW 15 11 FLDS="║                                                            ║"
  552. )ROW 16 11 FLDS="╚════════════════════════════════════════════════════════════╝"
  553. )PROC
  554.   Call rxPDZVarDefine 'ZENTER', 'ZESC', 'ZF4_A', 'ZF3'
  555.  
  556.   /* The following defines the possible return codes */
  557.   Call rxPDZVarDefine 'ZVERIFYPROC_RC_NORETURN'
  558.  
  559.   if sPage||sEdit||sDelete||sInsert||sRepeat = '_____' then
  560.    do
  561.     select
  562.      when ZFName = 'sPage' then
  563.       do
  564.        sPage = 'S'
  565.       end
  566.      when ZFName = 'sEdit' then
  567.       do
  568.        sEdit = 'S'
  569.       end
  570.      when ZFName = 'sDelete' then
  571.       do
  572.        sDelete = 'S'
  573.       end
  574.      when ZFName = 'sInsert' then
  575.       do
  576.        sInsert = 'S'
  577.       end
  578.      when ZFName = 'sRepeat' then
  579.       do
  580.        sRepeat = 'S'
  581.       end
  582.      otherwise
  583.       do
  584.        return ZVERIFYPROC_RC_NORETURN
  585.       end
  586.     end /* End of select */
  587.    end
  588.   svid = rxPDSaveScreen(ZBid)
  589.   if sPage <> '_' then
  590.    do
  591.     sHelpTitle=CENTER('Scrolling the rows by cursor positioning.',60)
  592.     akey = rxPDDisplay(zBID,'PUPPAGE01')
  593.     Call rxPDSetCursorFld ZBid, ZPName, 'sPage'
  594.     if akey = ZF3 | akey = ZF4_A then
  595.      do
  596.       rc = rxPDRestoreScreen(ZBid,svid)
  597.       return akey
  598.      end
  599.    end
  600.   if sEdit <> '_' then
  601.    do
  602.     sHelpTitle=CENTER('Edit a row.',60)
  603.     akey = rxPDDisplay(zBID,'PUPEDIT01')
  604.     if akey = ZF3 | akey = ZF4_A then
  605.      do
  606.       Call rxPDSetCursorFld ZBid, ZPName, 'sPage'
  607.       rc = rxPDRestoreScreen(ZBid,svid)
  608.       return akey
  609.      end
  610.     Call rxPDSetCursorFld ZBid, ZPName, 'sEdit'
  611.    end
  612.   if sDelete <> '_' then
  613.    do
  614.     sHelpTitle=CENTER('Delete a row.',60)
  615.     akey = rxPDDisplay(zBID,'PUPDELETE01')
  616.     if akey = ZF3 | akey = ZF4_A then
  617.      do
  618.       Call rxPDSetCursorFld ZBid, ZPName, 'sPage'
  619.       rc = rxPDRestoreScreen(ZBid,svid)
  620.       return akey
  621.      end
  622.     Call rxPDSetCursorFld ZBid, ZPName, 'sDelete'
  623.    end
  624.   if sInsert <> '_' then
  625.    do
  626.     sHelpTitle=CENTER('Insert a row.',60)
  627.     akey = rxPDDisplay(zBID,'PUPINSERT01')
  628.     if akey = ZF3 | akey = ZF4_A then
  629.      do
  630.       Call rxPDSetCursorFld ZBid, ZPName, 'sPage'
  631.       rc = rxPDRestoreScreen(ZBid,svid)
  632.       return akey
  633.      end
  634.     Call rxPDSetCursorFld ZBid, ZPName, 'sInsert'
  635.    end
  636.   if sRepeat <> '_' then
  637.    do
  638.     sHelpTitle=CENTER('Repeat a row.',60)
  639.     akey = rxPDDisplay(zBID,'PUPREPEAT01')
  640.     if akey = ZF3 | akey = ZF4_A then
  641.      do
  642.       Call rxPDSetCursorFld ZBid, ZPName, 'sPage'
  643.       rc = rxPDRestoreScreen(ZBid,svid)
  644.       return akey
  645.      end
  646.     Call rxPDSetCursorFld ZBid, ZPName, 'sRepeat'
  647.    end
  648.   rc = rxPDRestoreScreen(ZBid,svid)
  649.   if akey = ZESC then akey = ZENTER
  650.   return akey
  651. )END )BLANK FLDS="<Press ESC to end, F3 to quit or ENTER to select topic>"
  652.  
  653. )PANEL NAME=PUPPAGE01 XID=(ZESC,ZF4_A,ZF3,ZENTER)
  654. )COLORS TEXT=RED INPUT=WHITEHI OUTPUT=WHITEHI
  655. )ROW 09 16 FLDS="╔═════════════════════════════════════════════════════════════╗"
  656. )ROW 10 16 FLDS="║ %sHelpTitle                                                +║"
  657. )ROW 11 16 FLDS="║   You can scroll a currently displayed record to the top or ║"
  658. )ROW 12 16 FLDS="║   bottom of the display by positioning the cursor on the    ║"
  659. )ROW 13 16 FLDS="║   desired record and pressing either 'PAGEDOWN' or 'PAGEUP' ║"
  660. )ROW 14 16 FLDS="║   to scroll the display. You can also scroll left or right  ║"
  661. )ROW 15 16 FLDS="║   to a specific position in the record by pressing 'F10'    ║"
  662. )ROW 16 16 FLDS="║   to scroll left or 'F11' to scroll right.                  ║"
  663. )ROW 17 16 FLDS="║                                                             ║"
  664. )ROW 18 16 FLDS="╚═════════════════════════════════════════════════════════════╝"
  665. )END )BLANK FLDS="<Press ESC to end or F3 to quit>"
  666.  
  667. )PANEL NAME=PUPEDIT01 XID=(ZESC,ZF4_A,ZF3,ZENTER)
  668. )COLORS TEXT=RED INPUT=WHITEHI OUTPUT=WHITEHI
  669. )ROW 09 16 FLDS="╔═════════════════════════════════════════════════════════════╗"
  670. )ROW 10 16 FLDS="║ %sHelpTitle                                                +║"
  671. )ROW 11 16 FLDS="║   You can modify a record by simply typing over the data in ║"
  672. )ROW 12 16 FLDS="║   that record and then press 'ENTER' to update the record.  ║"
  673. )ROW 13 16 FLDS="║   Note, the file being edited is not updated when 'ENTER'   ║"
  674. )ROW 14 16 FLDS="║   is pressed. Modified records are not written to the file  ║"
  675. )ROW 15 16 FLDS="║   until the file is closed or saved.                        ║"
  676. )ROW 16 16 FLDS="║                                                             ║"
  677. )ROW 17 16 FLDS="║                                                             ║"
  678. )ROW 18 16 FLDS="╚═════════════════════════════════════════════════════════════╝"
  679. )END )BLANK FLDS="<Press ESC to end or F3 to quit>"
  680.  
  681. )PANEL NAME=PUPDELETE01 XID=(ZESC,ZF4_A,ZF3,ZENTER)
  682. )COLORS TEXT=RED INPUT=WHITEHI OUTPUT=WHITEHI
  683. )ROW 09 16 FLDS="╔═════════════════════════════════════════════════════════════╗"
  684. )ROW 10 16 FLDS="║ %sHelpTitle                                                +║"
  685. )ROW 11 16 FLDS="║   You can delete a row by pressing the 'ALT' and 'D' keys   ║"
  686. )ROW 12 16 FLDS="║   at the same time. When these keys are pressed, the row    ║"
  687. )ROW 13 16 FLDS="║   will be deleted from the database. Note, this action is   ║"
  688. )ROW 14 16 FLDS="║   immediate and final. No 'Verification' panel is displayed ║"
  689. )ROW 15 16 FLDS="║   where you might change your mind.                         ║"
  690. )ROW 16 16 FLDS="║                                                             ║"
  691. )ROW 17 16 FLDS="║                                                             ║"
  692. )ROW 18 16 FLDS="╚═════════════════════════════════════════════════════════════╝"
  693. )END )BLANK FLDS="<Press ESC to end or F3 to quit>"
  694.  
  695. )PANEL NAME=PUPDELETE02 XID=(ZESC,ZF4_A,ZF3,ZENTER)
  696. )COLORS TEXT=RED INPUT=WHITEHI OUTPUT=WHITEHI
  697. )ROW 09 16 FLDS="╔═════════════════════════════════════════════════════════════╗"
  698. )ROW 10 16 FLDS="║ %sHelpTitle                                                +║"
  699. )ROW 11 16 FLDS="║   You can delete one row by entering the 'D' command. You   ║"
  700. )ROW 12 16 FLDS="║   can delete multiple rows with the 'D num' command. Which  ║"
  701. )ROW 13 16 FLDS="║   rows are deleted depends upon the cursor position. If the ║"
  702. )ROW 14 16 FLDS="║   cursor is on the command line then the action is taken on ║"
  703. )ROW 15 16 FLDS="║   the row at the top of the display. If the cursor is in the║"
  704. )ROW 16 16 FLDS="║   body of the display, then the action affects that row.    ║"
  705. )ROW 17 16 FLDS="║                                                             ║"
  706. )ROW 18 16 FLDS="╚═════════════════════════════════════════════════════════════╝"
  707. )END )BLANK FLDS="<Press ESC to end or F3 to quit>"
  708.  
  709. )PANEL NAME=PUPINSERT01 XID=(ZESC,ZF4_A,ZF3,ZENTER) ATTR=`%+
  710. )COLORS TEXT=RED INPUT=WHITEHI OUTPUT=WHITEHI
  711. )ROW 09 16 FLDS="╔═════════════════════════════════════════════════════════════╗"
  712. )ROW 10 16 FLDS="║ %sHelpTitle                                                +║"
  713. )ROW 11 16 FLDS="║   You can insert a blank record by pressing the 'ALT' and   ║"
  714. )ROW 12 16 FLDS="║   'I' keys at the same time. When pressed, a blank row will ║"
  715. )ROW 13 16 FLDS="║   be inserted after the record where the cursor was when the║"
  716. )ROW 14 16 FLDS="║   'ALT_I' was pressed.                                      ║"
  717. )ROW 15 16 FLDS="║                                                             ║"
  718. )ROW 16 16 FLDS="║                                                             ║"
  719. )ROW 17 16 FLDS="║                                                             ║"
  720. )ROW 18 16 FLDS="╚═════════════════════════════════════════════════════════════╝"
  721. )END )BLANK FLDS="<Press ESC to end or F3 to quit>"
  722.  
  723. )PANEL NAME=PUPINSERT02 XID=(ZESC,ZF4_A,ZF3,ZENTER)
  724. )COLORS TEXT=RED INPUT=WHITEHI OUTPUT=WHITEHI
  725. )ROW 09 16 FLDS="╔═════════════════════════════════════════════════════════════╗"
  726. )ROW 10 16 FLDS="║ %sHelpTitle                                                +║"
  727. )ROW 11 16 FLDS="║   You can insert one row by entering the 'I' command. You   ║"
  728. )ROW 12 16 FLDS="║   can insert multiple rows with the 'I num' command. Which  ║"
  729. )ROW 13 16 FLDS="║   rows are inserted depends upon the cursor position. If the║"
  730. )ROW 14 16 FLDS="║   cursor is on the command line then the action is taken on ║"
  731. )ROW 15 16 FLDS="║   the row at the top of the display. If the cursor is in the║"
  732. )ROW 16 16 FLDS="║   body of the display, then the action affects that row.    ║"
  733. )ROW 17 16 FLDS="║                                                             ║"
  734. )ROW 18 16 FLDS="╚═════════════════════════════════════════════════════════════╝"
  735. )END )BLANK FLDS="<Press ESC to end or F3 to quit>"
  736.  
  737. )PANEL NAME=PUPREPEAT01 XID=(ZESC,ZF4_A,ZF3,ZENTER) ATTR=`%+
  738. )COLORS TEXT=RED INPUT=WHITEHI OUTPUT=WHITEHI
  739. )ROW 09 16 FLDS="╔═════════════════════════════════════════════════════════════╗"
  740. )ROW 10 16 FLDS="║ %sHelpTitle                                                +║"
  741. )ROW 11 16 FLDS="║   You can repeat a record by pressing the 'ALT' and 'R' keys║"
  742. )ROW 12 16 FLDS="║   at the same time. When these keys are pressed, a the row  ║"
  743. )ROW 13 16 FLDS="║   where the cursor is position is repeated at that position.║"
  744. )ROW 14 16 FLDS="║                                                             ║"
  745. )ROW 15 16 FLDS="║                                                             ║"
  746. )ROW 16 16 FLDS="║                                                             ║"
  747. )ROW 17 16 FLDS="║                                                             ║"
  748. )ROW 18 16 FLDS="╚═════════════════════════════════════════════════════════════╝"
  749. )END )BLANK FLDS="<Press ESC to end or F3 to quit>"
  750.  
  751. )PANEL NAME=PUPREPEAT02 XID=(ZESC,ZF4_A,ZF3,ZENTER)
  752. )COLORS TEXT=RED INPUT=WHITEHI OUTPUT=WHITEHI
  753. )ROW 09 16 FLDS="╔═════════════════════════════════════════════════════════════╗"
  754. )ROW 10 16 FLDS="║ %sHelpTitle                                                +║"
  755. )ROW 11 16 FLDS="║   You can repeat one row by entering the 'R' command. You   ║"
  756. )ROW 12 16 FLDS="║   can repeat multiple rows with the 'R num' command. Which  ║"
  757. )ROW 13 16 FLDS="║   rows are repeated depends upon the cursor position. If the║"
  758. )ROW 14 16 FLDS="║   cursor is on the command line then the action is taken on ║"
  759. )ROW 15 16 FLDS="║   the row at the top of the display. If the cursor is in the║"
  760. )ROW 16 16 FLDS="║   body of the display, then the action affects that row.    ║"
  761. )ROW 17 16 FLDS="║                                                             ║"
  762. )ROW 18 16 FLDS="╚═════════════════════════════════════════════════════════════╝"
  763. )END )BLANK FLDS="<Press ESC to end or F3 to quit>"
  764.  
  765. )PANEL NAME=PUPLOCATE01 XID=(ZESC,ZF4_A,ZF3,ZENTER)
  766. )COLORS TEXT=RED INPUT=WHITEHI OUTPUT=WHITEHI
  767. )ROW 09 16 FLDS="╔═════════════════════════════════════════════════════════════╗"
  768. )ROW 10 16 FLDS="║ %sHelpTitle                                                +║"
  769. )ROW 11 16 FLDS="║   You can locate a row in the file with the 'L num' command.║"
  770. )ROW 12 16 FLDS="║   This command will scroll the display placing that row at  ║"
  771. )ROW 13 16 FLDS="║   the top of the display.                                   ║"
  772. )ROW 14 16 FLDS="║                                                             ║"
  773. )ROW 15 16 FLDS="║   If the row number requested is outside the bounds of the  ║"
  774. )ROW 16 16 FLDS="║   file, then the 'BOTTOM' row is scrolled to the top of the ║"
  775. )ROW 17 16 FLDS="║   display.                                                  ║"
  776. )ROW 18 16 FLDS="╚═════════════════════════════════════════════════════════════╝"
  777. )END )BLANK FLDS="<Press ESC to end or F3 to quit>"
  778.