Jump to page titleUNITED STATES
hp.com home products and services support and drivers solutions how to buy
» contact hp

:

more options
 

hp.com home
End of Jump to page title
Example-PLI How To Use SMG To Format A Screen Display
Jump to content



» 

business support center

Home & Home Office Support:
» HP branded products
» Presario branded products
» Services & Warranties
Small & Medium Business Support:
» Small & Medium Business products
» Small & Medium Business services
Support for IT Professionals:
» Enterprise products (IT Resource Center)
» NonStop enterprise products
» Business & IT Services
Content starts here
Copyright (c) Digital Equipment Corporation 1988. All rights reserved
LAYERED PRODUCT: PLI, VERSION 3.1     OP/SYS: VMS, V4.7, V5.0

SOURCE:     Digital Customer Support Center



OVERVIEW:

This program demonstrates how to call SMG routines to format screen
output.  It draws a border and displays four messages.  One of the
messages is in reverse video, while another is blinking.  All of the
messages are double-spaced.


CAUTION:  This sample program has been tested using PLI, Version 3.1
on operating system VMS, V4.7, V5.0.  However, we cannot guarantee
its effectiveness because of the possibility of errors in transmission
or implementation.  It is meant to be used as a template for writing
your own program, and it may require modification for use on your
system.


PROGRAM NOTES:

The program creates a pasteboard, creates a virtual display, pastes
the virtual dislay, draws the border, and writes four messages.


PROGRAM SAMPLE:

SMGTEST:proc options(main);

%include $stsdef;
%include SMG$create_pasteboard;
%include SMG$create_virtual_display;
%include SMG$paste_virtual_display;
%include SMG$label_border;
%include SMG$put_line;
%include $smgdef;

dcl border_label char(14) init('*BORDER LABEL*');
dcl rows fixed binary(31) init(15);
dcl columns fixed binary(31) init(30);
dcl paste_rows fixed binary(31) init(2);
dcl paste_columns fixed binary(31) init(30);
dcl new_pid fixed binary(31);
dcl I fixed bin(31) init(0);
dcl display_id fixed bin(31);
dcl dbl_space fixed bin(31) init(2);
dcl disp_attr bit(32) aligned;
dcl message1 char(1) init(' ');
dcl message2 char(10) init('Message #1');
dcl message3 char(10) init('Message #2');
dcl message4 char(10) init('Message #3');
dcl message5 char(10) init('Message #4');

disp_attr = smg$m_border;

sts$value = SMG$CREATE_PASTEBOARD(new_pid,,,,);
if ^sts$success
       then do;
          put skip list('problems with create pasteboard');
          signal vaxcondition(sts$value);
       end;

sts$value = SMG$CREATE_VIRTUAL_DISPLAY
                       (rows,columns,display_id,disp_attr,,);
if ^sts$success
       then do;
          put skip list('problems with create virtual display');
          signal vaxcondition(sts$value);
       end;

sts$value = SMG$PASTE_VIRTUAL_DISPLAY
                      (display_id,new_pid,paste_rows,paste_columns,);
if ^sts$success
       then do;
          put skip list('problems with paste virtual display');
          signal vaxcondition(sts$value);
       end;

/*sts$value = SMG$label_border
                      (display_id,border_label,,,,,);
if ^sts$success
       then do;
          put skip list('problems with label border');
          signal vaxcondition(sts$value);
       end;*/

sts$value = SMG$put_line
                      (display_id,message1,,,,,);
if ^sts$success
       then do;
          put skip list('problems with put line #1');
          signal vaxcondition(sts$value);
       end;

sts$value = SMG$put_line
                      (display_id,message2,dbl_space,,,,);
if ^sts$success
       then do;
          put skip list('problems with put line #2');
          signal vaxcondition(sts$value);
       end;

sts$value = SMG$put_line
                      (display_id,message3,dbl_space,,,,);
if ^sts$success
       then do;
          put skip list('problems with put line #3');
          signal vaxcondition(sts$value);
       end;

sts$value = SMG$put_line
                      (display_id,message4,dbl_space,smg$m_BLINK,,,);
if ^sts$success
       then do;
          put skip list('problems with put line #4');
          signal vaxcondition(sts$value);
       end;

sts$value = SMG$put_line
                    (display_id,message5,dbl_space,smg$m_reverse,,,);
if ^sts$success
       then do;
          put skip list('problems with put line #5');
          signal vaxcondition(sts$value);
       end;

do I = 1 to 5;
   sts$value = SMG$put_line
                      (display_id,message1,,,,,);
   if ^sts$success
       then do;
          put skip list('problems with put line #1');
          signal vaxcondition(sts$value);
       end;
end;

end smgtest;




buy online or call 1.800.AT.COMPAQ
privacy statementusing this site means you accept its terms