<% @ Language="JScript" %> <% Server.Execute("/Server_Scripts/UpdateEntryCounter.asp"); %> Quick-and-Dirty Reorgs
[/includes/Nav_MainHeader.htm]

  Home
 

Tech Tips


 


Quick-and-Dirty Reorgs

For those of you interested in learning about how easy it is to generate complete I-QU PLUS-1 programs to reorganize DMS 1100 databases, KMSYS Worldwide has created a I-QU ReorgComposer demonstration that is readily available from our web site.

The reorganization isolates a CALC owner and its members in a single area. The generated code takes into consideration any sets that span to adjoining areas.

 

Fancy Screen Prints

Sometimes it is nice to jazz up a screen print to position the output on the page where you want it.

Here is a small script that will do a screen print (within rectangle) in 9-pt Courier New font. If you want to use a larger font, you might want to remove the PrintRect reference and adjust the script accordingly.

Note: The script below does substitution for special characters such as delimiters (hex 1c thru 1f) in the T27 environment but could easily be adapted for UTS usage:

Sub Main()

  Dim x as Integer

  Dim y as Integer

  Dim c as String

  Dim NewLine as String

  Dim LineHeight as Integer

  Dim Margin as Integer

  PrintBeginDoc

  ‘ Set printer font

  PrintSetFont "Courier New"

  PrintSetFontStyle fsNormal

  PrintSetFontSize 9

  ‘ Calculate margin as one inch

  Margin = PrintPageHeight / 10

  ‘ Calculate line height based on current font

  LineHeight = PrintTextHeight("X")

  PrintMoveTo Margin, Margin

  For x = 1 to 25

    PrintMoveTo Margin, Margin + x * LineHeight

    NewLine = ""

    For y = 1 to 80

      c = Mid(GetScreenLine(x), y, 1)

      If c = Chr(&H1f) or c = Chr(&H1e) or _

         c = Chr(&H1c) or c = Chr(&H1d) Then

        NewLine = NewLine & " " ‘ Substitute space

      Else

        NewLine = NewLine & c

      End If

    Next y

    Print NewLine

  Next x

  PrintRect Margin, Margin, Margin + (Margin * 6), _

  Margin + (LineHeight * (x + 1)), 5

  PrintEndDoc

End Sub

 

 

 
 

Information on the KMSYS Worldwide web server is Copyright (c) 1983-2013. All rights reserved.
All copyrights and trademarks are the property of their respective owners.
For information regarding this site, or to report a problem pertaining to the site, please contact support
License Agreements and PoliciesPrivacy and Cookie Statements

 

.