IBM Extension
IBM Extension

IBM i Graphics Support

You can use the CALL statement to access the following IBM® i graphics routines:
  • Graphical Data Display Manager (GDDM), a set of graphics primitives for drawing pictures
  • Presentation Graphics Routines (PGR), a set of business charting routines.

You access all these graphics routines with the same format of the CALL statement:

Read syntax diagramSkip visual syntax diagram
CALL GDDM Statement - Format

                                          .-----------------.   
                       (1)                V                 |   
>>-CALL--"GDDM"--USING------routine-name----+-------------+-+--><
                                            '-data-name-1-'     

Notes:
  1. IBM Extension

Routine-name is the name of the graphics routine you want to use.

The data-names that follow routine-name are the parameters necessary to use certain graphics routines. The number of parameters that you must specify varies, depending on which routine you select. When you select a graphics routine, make sure each parameter is the correct size and data type as required by that routine.

The following are examples of calling graphics routines. Remember, you must use the CALL literal format and define each parameter as required by the graphics routine you use.
  MOVE "FSINIT" TO OS-400-GRAPHICS-ROUTINE-NAME.
  CALL "GDDM" USING OS-400-GRAPHICS-ROUTINE-NAME.
     .
     .
  MOVE "GSFLD" TO OS-400-GRAPHICS-ROUTINE-NAME.
  CALL "GDDM" USING OS-400-GRAPHICS-ROUTINE-NAME,
                            PIC-ROW, PIC-COL,
                            PIC-DEPTH, PIC-WIDTH.

For more information about graphics routines and their parameters, see the GDDM Programming Guide book and the GDDM Reference.

End of IBM Extension
End of IBM Extension