Documente Academic
Documente Profesional
Documente Cultură
This publication has been provided pursuant to an agreement containing restrictions on its use. The publication is also
protected by Federal copyright law. No part of this publication may be copied or distributed, transmitted, transcribed,
stored in a retrieval system, or translated into any human or computer language, in any form or by any means,
electronic, magnetic, manual, or otherwise, or disclosed to third parties without the express written permission of:
Trademark Notices
Landmark, the Landmark logo, 3D Drill View, 3D Drill View KM, 3DVIEW, Active Field Surveillance,
Active Reservoir Surveillance, ARIES, Automate, BLITZ, BLITZPAK, CasingSeat, COMPASS,
Contouring Assistant, DataStar, DBPlot, Decision Suite, Decisionarium, DecisionDesktop, DecisionSpace,
DepthTeam, DepthTeam Explorer, DepthTeam Express, DepthTeam Extreme, DepthTeam Interpreter, DESKTOP-
PVT, DESKTOP-VIP, DEX, DFW, DIMS, Discovery, Drillability Suite, DrillModel, DrillVision, DSS, Dynamic
Surveillance System, EarthCube, EdgeCa$h, eLandmark, EPM, e-workspace, FastTrack, FZAP!, GeoDataLoad,
GeoGraphix, GeoGraphix Exploration System, GeoLink, GES, GESXplorer, GMAplus, GrandBasin, GRIDGENR, I2
Enterprise, iDims, IsoMap, LandScape, LeaseMap, LMK Resources, LogEdit, LogM, LogPrep, Make Great
Decisions, MathPack, Model Builder, MyLandmark, MyWorkspace, OpenBooks, OpenExplorer, OpenJournal,
OpenSGM, OpenTutor, OpenVision, OpenWorks, OpenWorks Well File, PAL, Parallel-VIP, PetroBank, PetroWorks,
PlotView, Point Gridding Plus, Pointing Dispatcher, PostStack, PostStack ESP, PRIZM, PROFILE, ProMAX,
ProMAX 2D, ProMAX 3D, ProMAX 3DPSDM, ProMAX MVA, ProMAX VSP, pStaX, QUICKDIF, RAVE, Real
Freedom, Reservoir Framework Builder, RESev, ResMap, RMS, SafeStart, SCAN, SeisCube, SeisMap, SeisModel,
SeisSpace, SeisVision, SeisWell, SeisWorks, SeisXchange, SigmaView, SpecDecomp, StrataMap, Stratamodel,
StratAmp, StrataSim, StratWorks, StressCheck, STRUCT, SynTool, SystemStart, T2B, TDQ, TERAS, Total Drilling
Performance, TOW/cs, TOW/cs The Oilfield Workstation, Trend Form Gridding, Turbo Synthetics, VIP, VIP-COMP,
VIP-CORE, VIP-DUAL, VIP-ENCORE, VIP-EXECUTIVE, VIP-Local Grid Refinement, VIP-POLYMER, VIP-
THERM, WavX, Web OpenWorks, Well Editor, Wellbase, Wellbore Planner, WELLCAT, WELLPLAN,
WellXchange, wOW, Xsection, ZAP!, Z-MAP Plus are trademarks, registered trademarks or service marks of
Landmark Graphics Corporation.
All other trademarks are the property of their respective owners.
Note
The information contained in this document is subject to change without notice and should not be construed as a
commitment by Landmark Graphics Corporation. Landmark Graphics Corporation assumes no responsibility for any
error that may appear in this manual.
Landmark Graphics Z-MAP Plus I/O Access Library
Contents
Introduction .....................................................................................................................1
Purpose of This Guide ......................................................................................................1
What Is in This Guide .......................................................................................................2
Typographic Conventions.................................................................................................3
Related Documentation.....................................................................................................4
R2003.0 iii
Z-MAP Plus I/O Access Library Landmark Graphics
iv Contents R2003.0
Landmark Graphics Z-MAP Plus I/O Access Library
R2003.0 Contents v
Z-MAP Plus I/O Access Library Landmark Graphics
vi Contents R2003.0
Landmark Graphics Z-MAP Plus I/O Access Library
Index ................................................................................................................................252
Introduction
Overview
This guide describes how to use ZPI/O in custom programs. Each of the
ZPI/O subroutines is documented with appropriate programming notes.
Sample programs are included, as are step-by-step guides for graphics
and file management programming.
This guide describes how to use the ZPI/O Access Library in custom
programs. Each of the ZPI/O subroutines is documented with
appropriate programming notes.
Draw and Plot Features (page 69) lists the subroutines used for
drawing lines from an array or member file, and displaying or
plotting a picture.
File Utilities (page 169) lists subroutines used for initializing the
information management environment; opening and closing
master files; attaching, compressing, creating, detaching and
listing master files; renaming the internal name of a master file;
opening, closing, deleting, listing, reading, writing, and obtaining
information from member files; positioning member files; and
reading, writing, and setting defaults for field descriptors.
Typographic Conventions
COMMON/WRKSPC/IWORK(n)
Related Documentation
ZPI/O Overview
Introduction
The routines included in the ZPI/O Access Library are compiled under
FORTRAN 77. Every reasonable effort has been made to minimize
system dependenciesif they do exist, they are localized.
To help you write a program using ZPI/O routines, this topic includes
an outline of the general structure of a program and an example
program.
I. Initialization
A. Initialize the ZPI/O environment SICOMM or SIISIL
B. ZIMS initialization, initialize master files SIIZIM
C. ZIGS initialization SIIZIG
II. File Utilities
A. Open new dataset SINOPN
B. Write field descriptors SIFLDW
C. Read data SIFRED
D. Write data SIFWRT
E. Write parameter record SIPRWD, SIPRWG or SIPRWC
F. Close dataset SIFCLO
III. Graphics Features
A. Open graphics file SIIZGF
B. Open picture S3IPIC, S2NPIC, S2OPIC or SIRPIC
C. Graphics Draw and Plot Features or Graphics Utilities
D. Close picture SIEPIC
E. Close graphics file SIEZGF
IV. Termination
A. Close graphics SIEZIG
B. Terminate ZPI/O environment SIIESIL
Writing:
Reading:
C
C SAMPLE ZPIO PROGRAM TO LIST A MEMBER FILE
C
COMMON /WRKSPC/IWORK(30000)
C
CHARACTER *80 NAMMFD(4)
C
DATA IDBUG /1/
C VARIABLES FOR S2FLST
CHARACTER * 7 REPORT
CHARACTER *24 NAME
CHARACTER *4 TYPES
LOGICAL BYNAME, BYTYPE
C VARIABLES FOR SILIST
CHARACTER *24 NAMIDA
CHARACTER *80 RPTITL
CHARACTER *20 ICLHDR(10)
CHARACTER *20 IFDFMT(10)
C
C INITIALIZE SYSTEM-WIDE COMMON STORAGE
C
IDBUG = 0
LTHWRK = 30000
LUNINF = 6
LUNSTA = 6
LUNWAR = 6
LUNERO = 6
LUNBUG = 6
IPROC = 0
CALL SIISIL(IDBUG, LTHWRK, LUNINF, LUNSTA, LUNWAR,
. LUNERO, LUNBUG, LUNDM1, LUNDM2, IPROC, ISTAT)
C
C INITIALIZE ZIMS
C NAME OF MFD TO ATTACH
C NON UNIX SYSTEMS MAY NAME THE MFD IN A DIFFERENT MANNER
NAMMFD(1) = /zplus1/users/wow/zpio/zpio.mfd
MFDNUM = 1
LUNDRC = 20
CALL SIIZIM(NAMMFD, MFDNUM, LUNDRC, ISTAT)
8 ZPI/O Overview: Example Program for Listing Members of a Master File R2003.0
Landmark Graphics Z-MAP Plus I/O Access Library
C
C LIST FILES ON MFD
REPORT = SUMMARY
NAME =
TYPES =
BYNAME = .FALSE.
BYTYPE = .FALSE.
NUMTYP = 0
LUNRPT = 0
C S2FLST DOESNT INITIALIZE ISTAT
ISTAT = 0
CALL S2FLST(REPORT, NAME, TYPES, BYNAME, BYTYPE, NUMTYP,
X LUNRPT, ISTAT)
IF (ISTAT .NE. 0) WRITE(LUNBUG, 20) ISTAT
20 FORMAT( ZPIO DEMO S2FLST RETURNS ISTAT OF ,I5)
C
C LIST A DATA FILE (ASSUME UNITIALIZED VARIABLES ARE ZERO)
C THIS NAME FOR A FILE COULD BE GOTTEN FROM THE PREVIOUS LISTING
NAMIDA = well data
RPTITL = sample report
DO 30 I=1,10
ICLHDR(I) =
IFDFMT(I) =
30 CONTINUE
MFDIDA = 1
LOGRPT = 6
ISTART = 1
CALL SILIST(NAMIDA, RPTITL, LINARA, ICLHDR, IFDFMT, MFDIDA,
1 IHISDA, LOGRPT, NUMLIN, LSTTYP, ISTART, IEND, NUMFLD,
2 ICLWID, IFDINX, IWDINX, WIDMIN, WIDMAX, ISTAT)
IF (ISTAT .NE. 0) WRITE(LUNBUG, 40) ISTAT
40 FORMAT( ZPIO DEMO SILIST RETURNS ISTAT OF ,I5)
C
C TERMINATION
CALL SIESIL(ISTAT)
C REMOVE LOCK FILES FOR MFDS (FOR UNIX SYSTEMS)
CALL SIEZIM
STOP
END
R2003.0 ZPI/O Overview: Example Program for Listing Members of a Master File 9
Z-MAP Plus I/O Access Library Landmark Graphics
C
C SAMPLE ZPIO PROGRAM TO DRAW SIMPLE GRAPHICS
C THE CREATED ZGF CAN BE DISPLAYED WITH OTHER LANDMARK PRODUCTS
C OR PLOTTED TO A HARDCOPY DEVICE.
C ASSUMES UNINITIALIZED VARIABLES ARE SET TO ZERO.
C
COMMON /WRKSPC/IWORK(30000)
C
C TURN DEBUG PRINTS ON OR OFF
DATA IDBUG /1/
C
C VARIABLES FOR SIIZGF
CHARACTER * 80 ZGFNAM
CHARACTER * 80 HISNEW, HISOLD
CHARACTER * 3 NEWZGF
C VARIABLES FOR S3IPIC
CHARACTER * 80 PICNAM
CHARACTER * 3 IFOLD
DOUBLE PRECISION VXMIN, VXMAX, VYMIN, VYMAX
C VARIABLES FOR SIGLIN
DIMENSION XCORS(10), YCORS(10)
C VARIABLE FOR SIGTXT
CHARACTER *80 TEXT
C
C INITIALIZE SYSTEM-WIDE COMMON STORAGE
C
C IDBUG = 0
LTHWRK = 30000
LUNINF = 6
LUNSTA = 6
LUNWAR = 6
LUNERO = 6
LUNBUG = 6
IPROC = 0
CALL SIISIL(IDBUG, LTHWRK, LUNINF, LUNSTA, LUNWAR,
. LUNERO, LUNBUG, LUNDM1, LUNDM2, IPROC, ISTAT)
C
CALL SIIZIG
C
C CREATE AND OPEN A ZGF
C FOR NON UNIX SYSTEMS, THIS MAY LOOK DIFFERENT
ZGFNAM = /zplus1/users/wow/zpio/zpio.zgf
NEWZGF = NEW
HISNEW = TESTING ZPIO INPUT GRAPHICS ROUTINES
C
CALL SIIZGF (ZGFNAM, HISNEW, NEWZGF, HISOLD, ISTAT)
IF (ISTAT .GT. 0) THEN
WRITE(LUNBUG, 100) ISTAT
100 FORMAT(zpiodraw siizgf returns istat ,i5)
GO TO 800
END IF
C
C OPEN A NEW PICTURE
PICNAM = HELLO WORLD ON A PICTURE
IFOLD = NEW
IFABSC = 0
IFPRJ = 1
IBRTIP = 2
XOFFST = 1.0
FREEX = 1.0
YOFFST = 1.0
FREEY = 1.0
VXMIN = 0.0
VXMAX = 10.0
VYMIN = 0.0
VYMAX = 10.0
XSCMAP = 1.0
YSCMAP = 1.0
XLONG = 10.0
YLONG = 10.0
C
CALL S3IPIC (PICNAM, IFOLD, IFABSC, IFPRJ, IBRTIP,
1 IABSSC, LONMND, LONMNM, LONMNS, LONMXD,
2 LONMXM, LONMXS, LATMND, LATMNM, LATMNS,
3 LATMXD, LATMXM, LATMXS, IHEM, IUTMCD,
4 IPJCOD, ISPCOD, IUNCOD, IRADTY VXMIN,
5 VXMAX, VYMIN, VYMAX, XOFFST, FREEX,
6 YOFFST, FREEY, XSCMAP, YSCMAP, XLONG,
7 YLONG, BOTPAR, TOPPAR, REFLAT, SFLAT,
8 REFLON, SFLON, FNORTH, FEAST, UNTFAC,
9 AXISA, AXISB, AZMTH, SCALE, XLNVEW,
. YLNVEW, ISTAT )
IF (ISTAT .GT. 0) THEN
WRITE(LUNBUG, 200) ISTAT
200 FORMAT(ZPIODRAW S3IPIC RETURNS ISTAT OF ,I5)
GO TO 800
END IF
C
C OPEN PICTURE SEGMENT
C
LGBTYP = 1
CALL SIGSOP(LGBTYP, ISTAT)
IF (ISTAT .GT. 0) THEN
WRITE(LUNBUG, 350) ISTAT
350 FORMAT(ZPIODRAW SIGSOP RETURNS ISTAT OF ,I5)
GO TO 800
END IF
C
C SET DEFAULTS
C
KTXTCL = 7
KIXTJU = 3
KTXTFO = 2
HTTEXT = .5
CALL SIGPDF(
1 KLNCLR, KLNTYP, KMKCLR, KMKTYP, KTXTCL,
2 KTXTFO, KTXTJU, KPOLCL, KSCLTY, WDLINE,
3 HTMARK, HTTEXT, ROTEXT, DSHLEN, DSHGAP,
4 HSHLEN, HSHGAP, HSHWAY, ISTAT)
IF (ISTAT .GT. 0) THEN
WRITE(LUNBUG, 300) ISTAT
300 FORMAT(ZPIODRAW SIGPDF RETURNS ISTAT OF ,I5)
GO TO 800
END IF
C
C DRAW A BORDER USING LINES
C
NUMPTS = 5
XCORS(1) = 1.0
YCORS(1) = 1.0
XCORS(2) = 11.0
YCORS(2) = 1.0
XCORS(3) = 11.0
YCORS(3) = 11.0
XCORS(4) = 1.0
YCORS(4) = 11.0
XCORS(5) = 1.0
YCORS(5) = 1.0
CALL SIGLIN(NUMPTS, XCORS, YCORS, ISTAT )
IF (ISTAT .GT. 0) THEN
WRITE(LUNBUG, 360) ISTAT
360 FORMAT(ZPIODRAW SIGLIN RETURNS ISTAT OF ,I5)
END IF
C
C DRAW TEXT
C
NUMCHR = 11
XCORS(1) = 4.0
YCORS(1) = 5.0
TEXT = HELLO WORLD
CALL SIGTXT(TEXT, NUMCHR, XCORS(1), YCORS(1), ISTAT )
IF (ISTAT .GT. 0) WRITE(LUNBUG, 370) ISTAT
370 FORMAT(ZPIODRAW: SIGTXT ISTAT,I3, GRAPHICS FEATURE NOT
OPEN)
C
C CLOSE GRAPHIC SEGMENT
C
CALL SIGSCL(ISTAT)
IF (ISTAT .GT. 0) THEN
WRITE(LUNBUG, 400) ISTAT
400 FORMAT(ZPIODRAW SIGSCL RETURNS ISTAT OF ,I5)
END IF
C
800 CONTINUE
C CLOSE THE PICTURE
C
CALL SIEPIC (ISTAT)
IF (ISTAT .GT. 0) THEN
WRITE(LUNBUG, 500) ISTAT
500 FORMAT(ZPIODRAW SIEPIC ISTAT,I5, ERROR CLOSING PICTURE)
END IF
C
C TERMINATION
CALL SIESIL(ISTAT)
STOP
END
C
PICNAM = DEFAULT GRAPHICS
IFOLD = NEW
IFABSC = 0
IFPRJ = 1
IBRTIP = 2
IABSSC = 0
LONMND = 0
LONMNM = 0
LONMNS = 0
LONMXD = 0
LONMXM = 0
LONMXS = 0
LATMND = 0
LATMNM = 0
LATMNS = 0
LATMXD = 0
LATMXM = 0
LATMXS = 0
IHEM = 0
IUTMCD = 0
IPJCOD = 0
ISPCOD = 0
IUNCOD = 0
IRADTY = 0
XOFFST = 1.0
FREEX = 1.0
YOFFST = 1.0
FREEY = 1.0
VXMIN = 0.0
VXMAX = 10.0
VYMIN = 0.0
VYMAX = 10.0
XSCMAP = 1.0
YSCMAP = 1.0
XLONG = 10.0
YLONG = 10.0
BOTPAR = 0.0
TOPPAR = 0.0
REFLAT = 0.0
SFLAT = 0.0
REFLON = 0.0
SFLON = 0.0
FNORTH = 0.0
FEAST = 0.0
UNTFAC = 0.0
AXISA = 0.0
AXISB = 0.0
AZMTH = 0.0
SCALE = 0.0
XLNVEW = 0.0
YLNVEW = 0.0
C
CALL S3IPIC (PICNAM, IFOLD, IFABSC, IFPRJ, IBRTIP,
1 IABSSC, LONMND, LONMNM, LONMNS, LONMXD,
2 LONMXM, LONMXS, LATMND, LATMNM, LATMNS,
3 LATMXD, LATMXM, LATMXS, IHEM, IUTMCD,
4 IPJCOD, ISPCOD, IUNCOD, IRDATY VXMIN,
5 VXMAX, VYMIN, VYMAX, XOFFST, FREEX,
6 YOFFST, FREEY, XSCMAP, YSCMAP, XLONG,
7 YLONG, BOTPAR, TOPPAR, REFLAT, SFLAT,
8 REFLON, SFLON, FNORTH, FEAST, UNTFAC,
9 AXISA, AXISB, AZMTH, SCALE, XLNVEW,
. YLNVEW, ISTAT )
IF (ISTAT .GT. 0) GO TO 800
C
C SET DEFAULTS
C
CALL SIGPDF(
1 KLNCLR, KLNTYP, KMKCLR, KMKTYP, KTXTCL,
2 KTXTFO, KTXTJU, KPOLCL, KSCLTY, WDLINE,
3 HTMARK, HTTEXT, ROTEXT, DSHLEN, DSHGAP,
4 HSHLEN, HSHGAP, HSHWAY, ISTAT)
IF (ISTAT .GT. 0) GO TO 800
C
C OPEN BORDER PICTURE SEGMENT
C
LGBTYP = 1
CALL SIGSOP(LGBTYP, ISTAT)
IF (ISTAT .GT. 0) GO TO 800
C
C DO A BORDER USING LINES
C
NUMPTS = 5
XCORS(1) = 1.0
YCORS(1) = 1.0
XCORS(2) = 11.0
YCORS(2) = 1.0
XCORS(3) = 11.0
YCORS(3) = 11.0
XCORS(4) = 1.0
YCORS(4) = 11.0
XCORS(5) = 1.0
YCORS(5) = 1.0
C
CALL SIGLIN(NUMPTS, XCORS, YCORS, ISTAT )
IF (ISTAT .GT. 0) GO TO 800
C
C CLOSE GRAPHIC SEGMENT
C
CALL SIGSCL(ISTAT)
IF (ISTAT .GT. 0) GO TO 800
C
C OPEN POLYGON LINES PICTURE SEGMENT
C
LGBTYP = 7
CALL SIGSOP(LGBTYP, ISTAT)
IF (ISTAT .GT. 0) GO TO 800
C
C DO A MARKERS AND LINES USING LINES
C
NUMMRK = 3
XCORS(1) = 2.0
YCORS(1) = 6.0
XCORS(2) = 10.0
YCORS(2) = 6.0
XCORS(3) = 6.0
YCORS(3) = 10.0
C
CALL SIGMRK(NUMMRK, XCORS, YCORS, ISTAT )
IF (ISTAT .GT. 0) GO TO 800
C
NUMPTS = 2
XCORS(1) = 2.50
YCORS(1) = 6.0
XCORS(2) = 9.50
YCORS(2) = 6.0
CALL SIGLIN(NUMPTS, XCORS, YCORS, ISTAT )
IF (ISTAT .GT. 0) GO TO 800
XCORS(1) = 9.50
YCORS(1) = 6.50
XCORS(2) = 6.50
YCORS(2) = 9.50
CALL SIGLIN(NUMPTS, XCORS, YCORS, ISTAT )
IF (ISTAT .GT. 0) GO TO 800
XCORS(1) = 5.50
YCORS(1) = 9.50
XCORS(2) = 2.50
YCORS(2) = 6.50
CALL SIGLIN(NUMPTS, XCORS, YCORS, ISTAT )
IF (ISTAT .GT. 0) GO TO 800
C
C CLOSE GRAPHIC SEGMENT
C
CALL SIGSCL(ISTAT)
IF (ISTAT .GT. 0) GO TO 800
C
C OPEN TEXT PICTURE SEGMENT
C
LGBTYP = 6
CALL SIGSOP(LGBTYP, ISTAT)
IF (ISTAT .GT. 0) GO TO 800
C
C DO TEXT
C
NUMCHR = 20
XCORS(1) = 3.0
IF (ISTAT .GT. 0) GO TO 800
XCORS(1) = 5.50
YCORS(1) = 9.50
XCORS(2) = 2.50
YCORS(2) = 6.50
CALL SIGLIN(NUMPTS, XCORS, YCORS, ISTAT )
IF (ISTAT .GT. 0) GO TO 800
C
C CLOSE GRAPHIC SEGMENT
C
CALL SIGSCL(ISTAT)
IF (ISTAT .GT. 0) GO TO 800
C
C OPEN TEXT PICTURE SEGMENT
C
LGBTYP = 6
CALL SIGSOP(LGBTYP, ISTAT)
IF (ISTAT .GT. 0) GO TO 800
C
C DO TEXT
C
NUMCHR = 20
XCORS(1) = 3.0
YCORS(1) = 5.0
TEXT = TEST INPUT GRAPHICS
C 123456789 123456789
C
CALL SIGTXT(TEXT, NUMCHR, XCORS(1), YCORS(1), ISTAT )
IF (ISTAT .GT. 0) GO TO 800
C
NUMCHR = 4
XCORS(1) = 5.50
YCORS(1) = 7.0
TEXT = HI!
C
CALL SIGTXT(TEXT, NUMCHR, XCORS(1), YCORS(1), ISTAT )
IF (ISTAT .GT. 0) GO TO 800
C
C CLOSE GRAPHIC SEGMENT
C
CALL SIGSCL(ISTAT)
IF (ISTAT .GT. 0) GO TO 800
C
C OPEN POLYGON FILE PICTURE SEGMENT
C
LGBTYP = 30
CALL SIGSOP(LGBTYP, ISTAT)
IF (ISTAT .GT. 0) GO TO 800
C
C DO A BORDER USING LINES
C
NUMVTX = 5
XCORS(1) = 4.50
YCORS(1) = 6.50
XCORS(2) = 7.50
YCORS(2) = 6.50
XCORS(3) = 7.50
YCORS(3) = 8.0
XCORS(4) = 4.50
YCORS(4) = 8.0
XCORS(5) = 4.50
YCORS(5) = 6.50
write(6, 133)
133 format( a )
C
CALL SIGPFL(NUMVTX, XCORS, YCORS, ISTAT )
IF (ISTAT .GT. 0) GO TO 800
C
C CLOSE GRAPHIC SEGMENT
C
CALL SIGSCL(ISTAT)
IF (ISTAT .GT. 0) GO TO 800
C
C CLOSE THE FIRST PICTURE
C
CALL SIEPIC (ISTAT)
IF (ISTAT .NE. 0) GO TO 800
C
IF(IDBUG .EQ. 1) THEN
WRITE(LUNBUG,1002)
1002 FORMAT(15X, ***** END OF FIRST PICTURE ****** )
WRITE(LUNBUG, 2001)
2001 FORMAT(15X, ***** BEGINNING OF SECOND PICTURE ****** )
ENDIF
C
PICNAM = SETTING GRAPHICS
IFOLD = NEW
IFABSC = 0
IFPRJ = 1
IBRTIP = 2
IABSSC = 0
LONMND = 0
LONMNM = 0
LONMNS = 0
LONMXD = 0
LONMXM = 0
LONMXS = 0
LATMND = 0
LATMNM = 0
LATMNS = 0
LATMXD = 0
LATMXM = 0
LATMXS = 0
IHEM = 0
IUTMCD = 0
IPJCOD = 0
ISPCOD = 0
XOFFST = 1.0
FREEX = 1.0
YOFFST = 1.0
FREEY = 1.0
IRADTY = 0
VXMIN = 0.0
VXMAX = 10.0
VYMIN = 0.0
VYMAX = 10.0
XSCMAP = 1.0
YSCMAP = 1.0
XLONG = 10.0
YLONG = 10.0
BOTPAR = 0.0
TOPPAR = 0.0
REFLAT = 0.0
SFLAT = 0.0
REFLON = 0.0
SFLON = 0.0
FNORTH = 0.0
FEAST = 0.0
UNTFAC = 0.0
AXISA = 0.0
AXISB = 0.0
AZMTH = 0.0
SCALE = 0.0
XLNVEW = 0.0
YLNVEW = 0.0
C
CALL S3IPIC (PICNAM, IFOLD, IFABSC, IFPRJ, IBRTIP,
1 IABSSC, LONMND, LONMNM, LONMNS, LONMXD,
2 LONMXM, LONMXS, LATMND, LATMNM, LATMNS,
3 LATMXD, LATMXM, LATMXS, IHEM, IUTMCD,
4 IPJCOD, ISPCOD, IUNCOD, IRADTY VXMIN,
5 VXMAX, VYMIN, VYMAX, XOFFST, FREEX,
6 YOFFST, FREEY, XSCMAP, YSCMAP, XLONG,
7 YLONG, BOTPAR, TOPPAR, REFLAT, SFLAT,
8 REFLON, SFLON, FNORTH, FEAST, UNTFAC,
9 AXISA, AXISB, AZMTH, SCALE, XLNVEW,
. YLNVEW, ISTAT )
IF (ISTAT .GT. 0) GO TO 800
C
C SET DEFAULTS
C
CALL SIGPDF(
1 KLNCLR, KLNTYP, KMKCLR, KMKTYP, KTXTCL,
2 KTXTFO, KTXTJU, KPOLCL, KSCLTY, WDLINE,
3 HTMARK, HTTEXT, ROTEXT, DSHLEN, DSHGAP,
4 HSHLEN, HSHGAP, HSHWAY, ISTAT)
IF (ISTAT .GT. 0) GO TO 800
C
C OPEN BORDER PICTURE SEGMENT
C
LGBTYP = 1
CALL SIGSOP(LGBTYP, ISTAT)
IF (ISTAT .GT. 0) GO TO 800
C
C SET SPECIAL LINE PARAMETERS
C
DSHLEN = 0.4
DSHGAP = 0.2
HSHLEN = 0.1
HSHGAP = 0.2
HSHWAY = -1.0
CALL SIGLPM( DSHLEN, DSHGAP, HSHLEN, HSHGAP, HSHWAY, ISTAT)
IF(ISTAT .GT. 0) GO TO 800
C
C SET LINE COLOR, LINE TYPE, AND LINE WIDTH
C
IRED = 2
CALL SIGLCL(IRED, ISTAT)
IF (ISTAT .GT. 0) GO TO 800
LDASH = 2
CALL SIGLTY(LDASH, ISTAT)
IF(ISTAT .GT. 0) GO TO 800
WIDTH = 4.0
CALL SIGLWD(WIDTH, ISTAT)
IF(ISTAT .GT. 0) GO TO 800
C
C DO A BORDER USING LINES
C
NUMPTS = 5
XCORS(1) = 1.0
YCORS(1) = 1.0
XCORS(2) = 11.0
YCORS(2) = 1.0
XCORS(3) = 11.0
YCORS(3) = 11.0
XCORS(4) = 1.0
YCORS(4) = 11.0
XCORS(5) = 1.0
YCORS(5) = 1.0
C
CALL SIGLIN(NUMPTS, XCORS, YCORS, ISTAT )
IF (ISTAT .GT. 0) GO TO 800
C
C CLOSE GRAPHIC SEGMENT
C
CALL SIGSCL(ISTAT)
IF (ISTAT .GT. 0) GO TO 800
C
C OPEN POLYGON LINES PICTURE SEGMENT
C
LGBTYP = 7
CALL SIGSOP(LGBTYP, ISTAT)
IF (ISTAT .GT. 0) GO TO 800
C
C SET MARKER COLOR, MARKER HEIGHT
C
IGREEN = 3
CALL SIGMCL(IGREEN, ISTAT)
IF(ISTAT .GT. 0) GO TO 800
HGTMRK = 0.3
CALL SIGMHT(HGTMRK, ISTAT)
IF(ISTAT .GT. 0) GO TO 800
C
C DO A MARKERS AND LINES USING LINES
C
NUMMRK = 3
XCORS(1) = 2.0
YCORS(1) = 6.0
XCORS(2) = 10.0
YCORS(2) = 6.0
XCORS(3) = 6.0
YCORS(3) = 10.0
ROTATE = 0.0
C
CALL S2GMRK(NUMMRK, XCORS, YCORS, ROTATE, ISTAT )
IF (ISTAT .GT. 0) GO TO 800
C
C SET LINE COLOR, TYPE, WIDTH
C
IYELL = 7
CALL SIGLCL(IYELL, ISTAT)
IF(ISTAT .GT. 0) GO TO 800
LHACH = 3
CALL SIGLTY(LHACH, ISTAT)
IF(ISTAT .GT. 0) GO TO 800
WIDTH = 2
CALL SIGLWD(WIDTH, ISTAT)
IF(ISTAT .GT. 0) GO TO 800
C
NUMPTS = 2
XCORS(1) = 2.50
YCORS(1) = 6.0
XCORS(2) = 9.50
YCORS(2) = 6.0
CALL SIGLIN(NUMPTS, XCORS, YCORS, ISTAT )
IF (ISTAT .GT. 0) GO TO 800
XCORS(1) = 9.50
YCORS(1) = 6.50
XCORS(2) = 6.50
YCORS(2) = 9.50
CALL SIGLIN(NUMPTS, XCORS, YCORS, ISTAT )
IF (ISTAT .GT. 0) GO TO 800
XCORS(1) = 5.50
YCORS(1) = 9.50
XCORS(2) = 2.50
YCORS(2) = 6.50
CALL SIGLIN(NUMPTS, XCORS, YCORS, ISTAT )
IF (ISTAT .GT. 0) GO TO 800
C
C CLOSE GRAPHIC SEGMENT
C
CALL SIGSCL(ISTAT)
IF (ISTAT .GT. 0) GO TO 800
C
C OPEN TEXT PICTURE SEGMENT
C
LGBTYP = 6
CALL SIGSOP(LGBTYP, ISTAT)
IF (ISTAT .GT. 0) GO TO 800
C
C SET TEXT COLOR, FONT, HEIGHT, JUSTIFICATION, ANGLE
C
ICYAN = 5
CALL SIGTCL(ICYAN, ISTAT)
IF(ISTAT .GT. 0) GO TO 800
TXTHGT = 0.5
CALL SIGTHT(TXTHGT, ISTAT)
IF(ISTAT .GT. 0) GO TO 800
JUSTCT = 3
CALL SIGTJU(JUSTCT, ISTAT)
IF(ISTAT .GT. 0) GO TO 800
IATLIC = 4
CALL SIGTFO(IATLIC, ISTAT)
IF(ISTAT .GT. 0) GO TO 800
TXTANG = 45.0
CALL SIGTRO(TXTANG, ISTAT)
IF(ISTAT .GT. 0) GO TO 800
C
C DO TEXT
C
NUMCHR = 20
XCORS(1) = 3.0
YCORS(1) = 5.0
TEXT = TEST INPUT GRAPHICS
C 123456789 123456789
C
CALL SIGTXT(TEXT, NUMCHR, XCORS(1), YCORS(1), ISTAT )
IF (ISTAT .GT. 0) GO TO 800
C
C
C SET TEXT COLOR, FONT, HEIGHT, JUSTIFICATION, ANGLE
C
MAGENT = 6
CALL SIGTCL(MAGENT, ISTAT)
IF(ISTAT .GT. 0) GO TO 800
TXTHGT = 0.2
CALL SIGTHT(TXTHGT, ISTAT)
IF(ISTAT .GT. 0) GO TO 800
JUSTRT = 2
CALL SIGTJU(JUSTRT, ISTAT)
IF(ISTAT .GT. 0) GO TO 800
IROMAN = 3
CALL SIGTFO(IROMAN, ISTAT)
IF(ISTAT .GT. 0) GO TO 800
TXTANG = 270.0
CALL SIGTRO(TXTANG, ISTAT)
IF(ISTAT .GT. 0) GO TO 800
C
NUMCHR = 4
XCORS(1) = 5.50
YCORS(1) = 7.0
TEXT = HI!
C
CALL SIGTXT(TEXT, NUMCHR, XCORS(1), YCORS(1), ISTAT )
IF (ISTAT .GT. 0) GO TO 800
C
C CLOSE GRAPHIC SEGMENT
C
CALL SIGSCL(ISTAT)
IF (ISTAT .GT. 0) GO TO 800
C
C OPEN POLYGON FILE PICTURE SEGMENT
C
LGBTYP = 30
CALL SIGSOP(LGBTYP, ISTAT)
IF (ISTAT .GT. 0) GO TO 800
C
C DO A POLYGON COLORFILL USING LINES
C
ICOLOR = 4
CALL SIGPCL(ICOLOR, ISTAT)
IF(ISTAT .GT. 0 ) GO TO 800
C
NUMVTX = 5
XCORS(1) = 4.50
YCORS(1) = 6.50
XCORS(2) = 7.50
YCORS(2) = 6.50
XCORS(3) = 7.50
YCORS(3) = 8.0
XCORS(4) = 4.50
YCORS(4) = 8.0
XCORS(5) = 4.50
YCORS(5) = 6.50
write(6, 155)
155 format( b)
C
CALL SIGPFL(NUMVTX, XCORS, YCORS, ISTAT )
IF (ISTAT .GT. 0) GO TO 800
C
C CLOSE GRAPHIC SEGMENT
C
CALL SIGSCL(ISTAT)
IF (ISTAT .GT. 0) GO TO 800
C
C CLOSE THE SECOND PICTURE
C
CALL SIEPIC (ISTAT)
IF (ISTAT .NE. 0) GO TO 800
C
IF(IDBUG .EQ. 1) THEN
WRITE(LUNBUG, 2002)
END IF
2002 FORMAT(15X, ***** END OF SECOND PICTURE ***** )
C
C CLOSE THE GRAPHICS FILE
800 CALL SIEZGF
CALL SIEZIG
C
999 CONTINUE
IF(ISTAT .NE. 0) WRITE(LUNERR, 899) NAMRET, ISTAT
899 FORMAT( ****** ,A6, - ERROR, PROGRAM DID NOT COMPLETE ,
1 SUCCESSFULLY: STATUS FLAG = ,I5)
C
WRITE(LUNBUG,9993) NAMRET
9993 FORMAT(//,20X, ++++++ ENDING OF TESTING ROUTINE ++++++ ,//,
. 1X,30(=),2X,A6,2X,30(=) )
C
STOP
END
Subroutine Descriptions
The most important parts of this guide are the subroutine descriptions.
Considerable effort has gone into constructing a set of consistent
interfaces.
Presentation of Information
The following categories of information are included for subroutine
descriptions:
Name
Function
Note
Environment
Format
Input Arguments
Output Arguments
Name
Subroutine names are always six characters long, the first character
being an S. This is followed by one of the following:
S2ALIN is the second version of SIALIN and S3GELM is the third version of
SOGELM.
Function
This is a brief, one-line description of what the subroutine does.
Additional detail is provided in the paragraph(s) that follow.
Note
Included are notes about arguments and other subroutines, examples,
hints and suggestions.
Environment
The environment description covers the environment that must be
established before and after this subroutine is executed, such as any
files that must be opened, data from other subroutines, system
dependencies, etc.
Format
This is the format of the FORTRAN 77 call statement with all required
arguments. Recommended names are provided for each argument.
Input Arguments
Input arguments are arranged in a table of three columns:
argument name
data type
description and default
Argument Name
The recommended names conform to FORTRAN-implicit typing
conventions for INTEGER and REAL.
There are a few instances in which an argument may need to be both an input and
an output argument. This is especially true if a new file is being created by a
process. If that file already exists, a version number is added and passed back in
the same argument. This makes the version number available for use in a later
subroutine if it is needed.
The code appears at the left side of the argument name to indicate that the
argument is used for both input and output.
Data Type
Data types are listed as:
C = CHARACTER
D = DOUBLE PRECISION
I = INTEGER
L = LOGICAL
R = REAL
Description
The description column contains a brief explanation of the arguments
function. Some arguments must have specific values. These values are
tabulated and explained in a list below the argument description. The
following mathematical symbols precede the values as needed:
Output Arguments
Output arguments are typically used to convey completion status
information. The format of this information is essentially the same as
for Input Arguments (see pages 27 to 28).
Internal Routines
There are some ZPI/O routines for which there is no documentation.
These routines are used internally by other ZPI/O routines and are, in
general, not used by application programmers.
Calling Arguments
It is a good idea to use only variable names rather than constants in the
calling arguments, because on occasion that variable may be
overwritten due to a conflict in parameters. If this is found to be the
case, please notify us. Also, the variables should not be set using the
PARAMETER statement since these cannot be overridden.
ISTAT <0 Warning message and some action has been taken to
continue processing
Files should be opened when working with most of the File utilities.
Every effort is made to close all files within a ZPI/O subroutine, but
sometimes some internal files may be left open. If you have trouble of
this kind, perform the following loop after the call in question. This
guarantees that the files are closed:
CALL SIname (
DO xxx, I = 1,5
CALL SIFCLO(I, ISTAT)
xxx CONTINUE
Reading a File
1. Open the old file SIOOPN.
3. If the file is a data file, read the field descriptors SIFLDR. The
number of field descriptors is obtained from the argument call.
Creating a File
1. Open the new file SINOPN.
This new filename (with the added version number) is returned to you
in the same argument you sent. It is very important to set the name of
the file equal to a parameter, send that parameter as part of the calling
argument.
For example, S4CDTR argument NAMODA for the name of the output
data file should be coded as:
This notifies you that you have the correct filename, if you use the
name in another routine after S4CDTR.
For files of this type, the documentation shows the code up on the left side of
the page to indicate that it is both an input and an output argument.
For example, the grid cell denoted by the XX in the diagram below is
cell (10,10). It is the (10 1)*12 + 10 = 118th word sequentially on the
member grid file.
XMAX
XMIN
Columns
1 2 3 4 5 6 7 8 9 10 11 12 YMAX
YMAX
1
2
3
4
5
Rows
6
7
8
9
10 XX
11
12
YMIN YMIN
XMIN
XMAX
Introduction
Internal Routines
S2DBUG
Input Arguments
Argument Data Description
Name Type and Default
IDBUG I Whether to print debug statements:
0 = Off, do not print debug statements
1 = On, print the debug statements
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, debug print file cannot be opened.
IDBUG reset to zero
SICOMM
For more control on where messages are printed, see SIISIL (page 41).
Call this routine (or SIISIL) first and only once in all application
programs.
Input Arguments
Argument Data Description
Name Type and Default
IDBUG I Whether to print debug statements:
0 = Off, do not print debug statements
1 = On, print debug statements
LTHWRK I Length of the workspace. It must be at least 3.
See Environment above.
SIESIL
Environment This subroutine should be called after all ZPI/O processing has been
completed and if an abend condition occurs. SIISIL or SICOMM must
have been called to initialize the ZPI/O environment.
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, problem closing the files
SIEZIM
This subroutine removes lock files on Unix systems. You can call it on
other systems, but it is unnecessary.
Environment Call this routine during the exit process for any programs that use
master files (MFDs). Call so that normal exits and any error exits both
call this routine.
SIISIL
Notes If there is any problem opening the files, a STOP may occur with the
message:
' ****** SISSIL - ERROR, PROBLEM OPENING FILES '
For Unix users the ZPI/O application needs to explicitly open those
output units (LUNINF, LUNSTA, LUNWAR, LUNERO, LUNBUG)
if IPROC = 1.
Call this routine (or SICOMM) first and only once in all application
programs.
Input Arguments
Argument Data Description
Name Type and Default
IDBUG I Whether to print debug statements:
0 = Off, do not print debug statements
1 = On, print debug statements
LTHWRK I Length of the work space. It must be at least 3.
See Environment above.
LUNINF I Logical unit number for output informative
messages.
Default = 6
Range Options: 099
LUNSTA I Logical unit number for output statistical (report)
messages.
Default = 6
Range Options: 099
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
1 = Warning, invalid informative unit,
process, or debug flag. The value has
been reset
0 = Operation was successful
1 = Error, invalid licensing setup
2 = Error, option unavailable
Introduction
Internal Routines
S2FLIN
This subroutine transfers an external file into a member file. The user
must describe the input file by means of a format, either on the input
file or in a format file. For information and examples of how to do this,
see Appendix D. Import/Export in the Z-MAP Plus Reference
Manual. (Where the term format is used in this subroutine description,
the term format group is used in Appendix D. Import/Export.)
Environment The ZPI/O and ZIMS environments must be initialized before you call
this routine.
Input Arguments
Argument Data Description
Name Type and Default
NAMDAT C*80 Name of the external input data file.
NAMDIC C*80 Name of format file containing the format.
Blanked if format is on the input data file.
NAMGRP C*40 Name of format in NAMDIC file which describes
the input data file.
NAMFIL C*24 Name of output member file to create.
LATTNM C*24 Name of the RESIN lattice which specifies the
geometry of the cell table being imported.
Required if importing a RESIN cell table file,
blanked otherwise.
GRPCHR C*1 Format identifier.
Default = @
CMTCHR C*1 Comment record identifier.
Default = !
HSTCHR C*1 History record identifier.
Default = +
DICFLG L Whether the format and input data are on the
same file:
.TRUE. = They are on the same file
.FALSE. = They are on different files
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
2 = Warning, input file is empty
1 = Warning, format file supplied, but
DICFLG = .TRUE.; reset to use this input
data file
0 = Operation was successful
1 = Error, problem importing data file
2 = Error, file containing the format and
import data file are the same, but
DICFLG indicates they are different
S2GRST
Environment The ZPI/O and ZIMS environments must be initialized before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
NAMGRD C*24 Name of the input grid file.
MFDGRD I Number of the master file containing the input
grid file.
Range Options: 05
IHISGR I History display for input grid file:
0 = Do not display history information
1 = Display history information
MNRWIN I Minimum row at which to begin statistics (top
edge of window). A zero uses the default.
Default = 1
MXRWIN I Maximum row at which to end statistics (bottom
edge of window). A zero uses the default.
Default = Number of rows
MNCWIN I Minimum column at which to begin statistics
(left edge of window). A zero uses the default.
Default = 1
MXCWIN I Maximum column at which to end statistics (right
edge of window). A zero uses the default.
Default = Number of columns
Output Arguments
Argument Data Description
Name Type and Default
ZMEAN R Mean of z.
S4CDTR
Environment The ZPI/O and ZIMS environments must be initialized before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
2 = Warning, problem writing out extended
history
1 = Warning, duplicate files, a version
number has been added
0 = Operation was successful
1 = Error, duplicate files, invalid master file
number or master file is read-only
2 = Error, invalid version number
3 = Error, 5 files already in use
4 = Error, duplicate files, specify master file
number
5 = Error, cannot find the file
6 = Error, reading parameter record
7 = Error, reading field descriptors
8 = Error, writing field descriptors
9 = Error, writing parameter record
10 = Error, defining default field descriptor
11 = Error, setting up coordinate
transformation parameters
12 = Error, converting parameters
13 = Error, invalid field matchups
14 = Error, performing the coordinate
transformation
15 = Error, writing projection information to
adjunct record
16 = Error, file does not contain the necessary
fields
17 = Error, UTM is not valid for grads map
Modified Polyconic
Albers Equal Area
Standard Mercator
Key:
Y = argument required 1 Also serves as a single standard parallel
2
N = argument not required Polyconic projection also has a central meridian with associated scale factor
3
O = argument optional. If not Hemisphere defines false northing for UTM
specified, default value is used 4 One or the other is required
* User defined
SICTST
This subroutine obtains statistics about a control point file, which must
contain an X (Easting) field and a Y (Northing) field.
Environment The ZPI/O and ZIMS environments must be initialized before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
Output Arguments
Argument Data Description
Name Type and Default
XRANGE R Range of x.
YRANGE R Range of y.
ZRANGE R Range of z.
ZMEAN R Mean of z.
SIFDST
Input Arguments
Argument Data Description
Name Type and Default
NAMDAT C*24 Name of the input data file.
TYPRPT C*8 Type of report printed:
NONE = No report
PARTIAL = Summary report
FULL = Full report
ALLWIN C*6 Type of data windowing. Blanked if the default
is to be used.
ALL = Examine all the field values.
Window limits are set to 1.0E30
and 1.0E30.
WINDOW = Examine field values in window.
Output Arguments
Argument Data Description
Name Type and Default
NCPRED I Number of points read.
NCPWIN I Number of points in the window.
NOZNON I Number of null data values (ZNONs) on the file.
FDFRST R First coordinate in the window.
FDLAST R Last coordinate in the window.
FDMIN R Minimum value used in the computation.
FDMAX R Maximum value used in the computation.
FDRANG R Range of values in the window.
FDMEAN R Mean of values in the window.
FDRMS R Root mean square of values in the window.
FDSTD R Standard deviation of values in the window.
FDREL R Relative variation of values in the window.
ZNON R Null value.
ISTAT I Status flag:
0 = Operation was successful
1 = Error, invalid master file number or
master file is read-only
2 = Error, duplicate files, specify master file
number
3 = Error, cannot find the file
4 = Error, 5 files already in use
5 = Error, statistics cannot be obtained for this
file type
6 = Error, reading parameter record
7 = Error, reading field descriptors
8 = Error, field selected is a character field
9 = Error, invalid report type
10 = Error, invalid field index
11 = Error, problem computing field statistics
SIFLOT
Environment The ZPI/O and ZIMS environments must be initialized before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, problem importing data file
2 = Error, the file format dataset and export
file have the same name
SIGLST
This subroutine prints a report of all or part of the grid, plots the
contour representation, or both.
Environment The ZPI/O and ZIMS environments must be initialized before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
GRDFMT C*80 Output format for the grid report. Blanked if the
default format is to be used.
Default = (1X, 5(G13.7,2X))
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
3 = Warning, number of contour levels is
greater than 100. It has been reset.
2 = Warning, bad input format. Default
format being used.
1 = Warning, report unit was zero. It has been
reset.
0 = Operation was successful.
1 = Error, invalid master file number or
master file is read-only.
2 = Error, duplicate files, specify master file
number.
3 = Error, cannot find the file.
4 = Error, 5 files already in use.
5 = Error, this is a data file not a grid file.
6 = Error, problem reading parameter record.
7 = Error, problem positioning the file.
8 = Error, minimums must be less than the
maximums.
9 = Error, problem loading grid.
10 = Error, problem printing grid report.
11 = Error, the interval between adjacent
contours is zero.
SILIST
Note The format to print text strings must be in the form of nA4, where n is
the number of words. (See the IFDFMT argument description below)
Z 8D 1074 = 9 chars = 3 words = 3A4
Z-MAP #1 = 8 chars = 2 words = 2A4
ZPIO LISTING = 12 chars = 3 words = 3A4
Environment The ZPI/O and ZIMS environments must be initialized before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
2 = Warning, number of fields on the file was
greater than 10. Reset to 10.
1 = Warning, printer unit was zero. It has
been reset.
0 = Operation was successful.
1 = Error, invalid master file number or
master file is read-only.
2 = Error, duplicate files, specify master file
number.
3 = Error, cannot find the file.
4 = Error, 5 files already in use.
5 = Error, this is a grid file, not a data file.
6 = Error, problem reading parameter record.
7 = Error, problem reading field descriptor.
8 = Error, no area or line name field on file.
9 = Error, problem positioning the file.
10 = Error, there is no match for line or area
name.
11 = Error, problem creating field format.
12 = Error, problem setting up column headers.
Introduction
Use the Draw and Plot Features subroutines for these tasks:
draw lines from an array or member file
display and plot a picture
Internal Routines
This section describes the following internal routines for drawing and
plotting features:
S2ALIN (page 70)
S2DSPT (page 72)
S3ZLIN (page 74)
S2ALIN
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file and a picture opened before this routine is called.
S2DSPT
Name S2DSPT
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file and a picture opened before this routine is called.
Input Arguments
Argument Data Description
Name Type and Default
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, performing hardcopy processing
S3ZLIN
Dashed lines may use up to three different dash and gap lengths to
define a dashed line pattern. For instance, a double dash patterned line
can be used to create a dash-dot pattern. Similarly, a triple dash
patterned line may be used to create a dash-dot-dot pattern.
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file and a picture opened before this routine is called.
Input Arguments
Argument Data Description
Name Type and Default
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, problem drawing lines
Graphics Utilities
Introduction
Internal Routines
Graphic Routines
S2GMRK
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file, a picture and a graphics feature must be opened before this routine
is called.
Input Arguments
Argument Data Description
Name Type and Default
NUMMRK I Number of markers to draw.
XCORS R Array, of length NUMMRK, containing the x
coordinates of the center of the markers, in the
currently defined coordinate system.
YCORS R Array, of length NUMMRK, containing the y
coordinates of the center of the markers, in the
currently defined coordinate system.
ROTATE R Array, of length NUMMRK, containing the
angles of rotation for the markers, in degrees.
Range Options: 0.0360.0
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, number of markers is zero
2 = Error, graphics feature is not open
Graphic Routines
S2ZGIN
Name S2ZGIN
Environment The ZPI/O and ZIGS environments must be initialized and the graphics
file must not exist before this routine is called.
Input Arguments
Argument Data Description
Name Type and Default
NAMFLT C*80 Name of neutral (disk) file.
NAMZGF C*80 Name of new graphics file. If blank, the name of
the graphics file is assumed to be the first record
in the neutral file of the form:
Col. 114 = $HT 88 NAMZGF
Col. 1580 = Name of the graphics file
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, opening neutral file
2 = Error, the input graphics filename is blank
and the graphics name specified in the
neutral file is blank also
Graphic Routines
S2ZGOT
Environment The ZPI/O and ZIGS environments must be initialized before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
NAMZGF C*80 Name of the input graphics file.
NAMFLT C*80 Name of output neutral (disk) file.
NAMPIC C*80 Array, of length NUMPIC, containing the names
of pictures to be output. Required if SELECT =
ONLY or EXCEPT.
SELECT C*8 Which pictures in the graphics file to export.:
ALL = Export all pictures on import graphics
file
ONLY = Export only the pictures specified in
NAMPIC
EXCEPT = Export all pictures except those
specified by NAMPIC
Graphic Routines
S3GELM
Environment A call to SOGLBG to retrieve the next graphics feature must be done
before this routine is called.
Input Arguments
Argument Data Description
Name Type and Default
LENARY I Length of output arrays.
Output Arguments
Argument Data Description
Name Type and Default
Graphic Routines
S3IPIC
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file opened before this routine is called.
Input Arguments
Argument Data Description
Name Type and Default
Output Arguments Input for new picture, Output for old picture
Argument Data Description
Name Type and Default
Graphic Routines
S3NPIC
Note If the left longitude is greater than the right longitude, the map is made
across the dateline.
You cannot map across the dateline if using grads. For grads, left
longitude cannot be greater than right longitude.
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file opened before this routine is called.
Input Arguments
Argument Data Description
Name Type and Default
Output Arguments
Argument Data Description
Name Type and Default
Modified Polyconic
Albers Equal Area
Standard Mercator
Cutline
(XLNVEW,YLNVEW)
FREEY (VXMAX,VYMAX)
YLNVEW
YLONG
Scaled Area
XOFFST (User units) FREEX
In General
TOP/BOTTOM Refers to longitude or eastings
LEFT/RIGHT SIDES Refers to latitude or northings
Graphic Routines
S3OPIC
Environment The ZPI/O and ZIGS environments must be initialized and the graphics
file opened before this routine is called.
Input Arguments
Argument Data Description
Name Type and Default
PICTUR C*80 Name of picture.
Output Arguments
Argument Data Description
Name Type and Default
Modified Polyconic
Albers Equal Area
Standard Mercator
Cutline
(XLNVEW,YLNVEW)
FREEY (VXMAX,VYMAX)
YLNVEW
YLONG
Scaled Area
XOFFST (User units) FREEX
In General
TOP/BOTTOM Refers to longitude or eastings
LEFT/RIGHT SIDES Refers to latitude or northings
Graphic Routines
S4PCIN
Environment The ZPI/O and ZIGS environments must be initialized, the graphics
file opened, and all pictures on that file closed before this routine is
called.
Input Arguments
Argument Data Description
Name Type and Default
NAMPIC C*80 Name of the picture.
Output Arguments
Argument Data Description
Name Type and Default
Modified Polyconic
Albers Equal Area
Standard Mercator
Graphic Routines
SIEPIC
Environment The ZPI/O and ZIGS environments must be initialized and a picture
opened before this routine is called.
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, problem closing the currently open
picture
Graphic Routines
SIEZGF
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file opened before this routine is called.
Graphic Routines
SIEZIG
Environment The ZPI/O and ZIGS environments must be initialized before this
routine is called.
Graphic Routines
SIGLCL
Environment The ZPI/O and ZIGS environments must be initialized, and a graphic
file and a picture opened before this routine is called.
Input Arguments
Argument Data Description
Name Type and Default
ICOLOR I Color index for drawing lines, from the color
table currently defined.
Range Options: 0255
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, invalid line color index
Graphic Routines
SIGLIN
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file, a picture, and a graphics feature must be opened before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
NUMPTS I Number of points.
XCORS R Array, of length NUMPTS, containing the x
coordinate values.
YCORS R Array, of length NUMPTS, containing the y
coordinate values.
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, number of points is zero
2 = Error, graphics feature is not open
Graphic Routines
SIGLPM
Input Arguments
Argument Data Description
Name Type and Default
DSHLEN R Length of dash.
Default = 0.2 in or 0.5 cm
DSHGAP R Length of gap between dashes.
Default = 0.1 in or 0.25 cm
HSHLEN R Length of hachure marks.
Default = 0.04 in or 0.10 cm
HSHGAP R Length of gap between hachures.
Default = 0.4 in or 1.0 cm
HSHWAY R Direction of hachures:
1 = Pointing uphill
1 = Pointing downhill
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, dash length is negative
2 = Error, dash gap length is negative
3 = Error, hachure length is negative
4 = Error, hachure gap length is negative
Graphic Routines
SIGLTY
Name SIGLTY
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file, a picture, and a graphics feature must be opened before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
LTYP I Type of line:
1 = Plain
2 = Dashed
3 = Hachured
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, invalid line type
Graphic Routines
SIGLWD
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file, a picture, and a graphics feature must be opened before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
WIDTH R Line width. This is a scalar by which the standard
line width is multiplied to get a new line width.
Range Options: 18
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, invalid line width
Graphic Routines
SIGMCL
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file, a picture and a graphics feature must be opened before this routine
is called.
Input Arguments
Argument Data Description
Name Type and Default
ICOLOR I Color index for drawing markers, from the color
table currently defined.
Range Options: 0255
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, invalid marker color index
Graphic Routines
SIGMHT
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file, a picture, and a graphics feature must be opened before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
HEIGHT R Height for markers, in plotter units (in or cm).
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, marker height is less than or equal
to zero
Graphic Routines
SIGMTY
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file, a picture, and a graphics feature must be opened before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
MARKER I Symbol code for type of marker. (See Appendix
C. Symbols, Fonts, and Line Patterns in the
Z-MAP Plus Reference Manual.)
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, invalid marker type
Graphic Routines
SIGPCL
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file, a picture, and a graphics feature must be opened before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
ICOLOR I Color index for filling polygons, from the color
table currently defined.
Range Options: 0255
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, invalid polygon color index
Graphic Routines
SIGPDF
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file, a picture, and a graphic feature must be opened before this routine
is called.
Input Arguments
Argument Data Description
Name Type and Default
KTXTCL I Color index for drawing text, from the color table
currently defined.
Default = 1 (black on plotter, white on screen)
Range Options: 0255
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, invalid scale type
2 = Error, invalid color index
3 = Error, invalid line type
4 = Error, invalid line width multiplier
5 = Error, invalid marker type
6 = Error, invalid text font
7 = Error, invalid text justification
8 = Error, invalid text rotation
9 = Error, marker height is negative
10 = Error, text height is negative
11 = Error, dash length is negative
12 = Error, dash gap is negative
13 = Error, hachure length is negative
14 = Error, hachure gap is negative
15 = Error, invalid hachure direction
Graphic Routines
SIGPFL
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file, a picture, and a graphic feature must be opened before this routine
is called.
Input Arguments
Argument Data Description
Name Type and Default
NVERT I Number of vertices of the polygon.
XCORS R Array, of length NVERT, containing the x
coordinates of polygon vertices, in the currently
defined coordinate system.
YCORS R Array, of length NVERT, containing the y
coordinates of polygon vertices, in the currently
defined coordinate system.
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, number of vertices is zero
2 = Error, graphics segment is not open
3 = Error, polygon is not closed
4 = Error, maximum number of vertices
allowed has been exceeded
5 = Error, problem colorfilling the polygons
Graphic Routines
SIGSCL
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file, a picture, and a graphics feature must be opened before this
routine is called.
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, closing graphic feature
2 = Error, no graphics feature is currently
open
Graphic Routines
SIGSCS
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file, a picture, and a graphics feature must be opened before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
ISCALE I Type of coordinate system:
1 = Engineering units
2 = Plotter units (in or cm)
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, invalid scale type
Graphic Routines
SIGSDL
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file, a picture, and a graphics feature must be opened before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
ISEGTY I Graphics feature number for the graphics feature
to delete. (See Appendix A. Graphics Feature
Codes in the Z-MAP Plus Reference Manual.)
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
1 = Warning, graphics feature has been closed
0 = Operation was successful
1 = Error, invalid graphics feature number
2 = Error, unsuccessful delete
3 = Error, problem closing graphics feature
Graphic Routines
SIGSOP
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file, a picture, and a graphics feature must be opened before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
ISEGTY I Graphics feature number for the graphics feature
to open. (See Appendix A. Graphics Feature
Codes in the Z-MAP Plus Reference Manual.)
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, invalid graphics feature number
2 = Error, problem opening graphics feature
Graphic Routines
SIGTCL
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file, a picture, and a graphic feature must be opened before this routine
is called.
Input Arguments
Argument Data Description
Name Type and Default
ICOLOR I Color index for drawing text, from the color table
currently defined.
Range Options: 0255
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, invalid text color index
Graphic Routines
SIGTFO
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file, a picture, and a graphics feature must be opened before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
IFONT I Type of text font. (See Appendix C. Symbols,
Fonts, and Line Patterns in the Z-MAP Plus
Reference Manual.)
1 = Plain
2 = Roman simplex
3 = Roman complex
4 = Italics
5 = Duplex
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, invalid font type
Graphic Routines
SIGTHT
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file, a picture, and a graphics feature must be opened before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
HEIGHT R Height of text, in plotter units (in or cm).
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, text height is less than or equal to
zero
Graphic Routines
SIGTJU
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file, a picture, and a graphics feature must be opened before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
JUSTIF I Justification method:
1 = Lower left
2 = Lower right
3 = Center
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, invalid justification type
Graphic Routines
SIGTRO
Name SIGTRO
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file, a picture, and a graphics feature must be opened before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
ANGLE R Angle at which to draw text, in degrees from
horizontal.
Range Options: 0.0360.0
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, invalid text rotation angle
Graphic Routines
SIGTXT
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file, a picture, and a graphics feature must be opened before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
TEXT C*80 Text string of length NCHAR.
NCHAR I Number of characters in text string.
Range Options: 080
XCORS R The x coordinate of text.
YCORS R The y coordinate of text.
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, graphics feature is not open
Modified Polyconic
Albers Equal Area
Standard Mercator
Cutline
(XLNVEW,YLNVEW)
FREEY (VXMAX,VYMAX)
YLNVEW
YLONG
Scaled Area
XOFFST (User units) FREEX
In General
TOP/BOTTOM Refers to longitude or eastings
LEFT/RIGHT SIDES Refers to latitude or northings
Graphic Routines
SIIZGF
Environment The ZPI/O and ZIGS environments must be initialized before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
ZGFNAM C*80 Disk filename of graphics file. This name is a
dummy variable on systems without dynamic file
allocation, but good for documentation.
HISNEW C*80 Header for the new graphics file.
IFNEW C*3 File type:
NEW = Open a new graphics file
OLD = Open an old graphics file
Output Arguments
Argument Data Description
Name Type and Default
HISOLD C*80 Header of an old graphics file.
ISTAT I Status flag:
0 = Operation was successful
1 = Error, opening graphics file
2 = Error, invalid graphics file type
Graphic Routines
SIIZIG
Environment The ZPI/O environment must be initialized before this routine is called.
Graphic Routines
SIOVLY
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file and Copy To picture opened before this routine is called.
Input Arguments
Argument Data Description
Name Type and Default
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, copying graphics information
2 = Error, problem positioning index map
Graphic Routines
SIPCAS
Note The Copy From graphics file is opened on logical unit 27 and the
Copy To graphics file is opened on logical unit 28.
Environment The ZPI/O and ZIGS environments must be initialized and the graphics
files and pictures exist and are closed.
Input Arguments
Argument Data Description
Name Type and Default
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
1 = Warning, clipping is currently
unavailable. Reset to zero.
0 = Operation was successful.
1 = Error, logical not properly set.
2 = Error, performing the copy process.
3 = Error, from copying process.
4 = Error, closing copy process.
Cutline
(XLNVEW,YLNVEW)
XOFFST FREEX
*
(XLL,YLL)
(VXMIN,VYMIN)
YOFFST
(0.0,0.0) XLONG
XLNVEW
Copy To Space
Cutline
(XLNVEW,YLNVEW)
Scaled Area
XOFFST (User units) FREEX
In General
TOP/BOTTOM Refers to longitude or eastings
LEFT/RIGHT SIDES Refers to latitude or northings
Graphic Routines
SIPCCP
Environment The ZPI/O and ZIGS environments must be initialized and the graphics
file which contains the Copy From picture must be open. The Copy
From picture is closed by this routine.
Input Arguments
Argument Data Description
Name Type and Default
PICFRM C*80 Name of the input Copy From picture.
PICTO C*80 Name of the new Copy To picture. If blank, the
Copy From picture name is to be used.
ZGFAUX C*80 Name of the output Copy To graphics file.
Blanked if the same graphics file is to be used.
HISNEW C*80 History for the new graphics file.
NOTZGF I Which graphics file to copy the new picture into:
0 = Same graphics file
1 = Old graphics file
2 = New graphics file
LGBOUT I Maintain the individual graphics features or copy
as a single block:
1 = Copy into a single feature
2 = Maintain divisions
LGBNUM I Number of graphics features to copy. Set to zero
if all graphics features are to be copied and
LGBTYP(1) is set to a negative number.
LGBTYP I Array, of length 40, containing the codes for the
graphics features to be copied. To copy entire
picture, set LGBTYP(1) to a negative number.
For a list of codes, see Appendix A. Graphics
Feature Codes in the Z-MAP Plus Reference
Manual.
Output Arguments
Argument Data Description
Name Type and Default
Graphic Routines
SIPCDF
Function Compute four corners of one picture relative to another picture for
assembly/overlay
This subroutine computes defaults used to perform picture composition
and overlay tasks in the ZPI/O environment. Its primary function is to
provide the lower left corner of the Copy From picture in terms of the
Copy To space. (See the illustration following Output Arguments.)
The Copy From graphics file is opened on logical unit 27, and the
Copy To graphics file is opened on logical unit 28.
Environment The ZPI/O and ZIGS environments must be initialized and the graphics
files and pictures must exist and be closed.
Input Arguments
Argument Data Description
Name Type and Default
PICFRM C*80 Name of input Copy From picture.
PICTO C*80 Name of output Copy To picture.
ZGFFRM C*80 Name of graphics file containing input Copy
From picture.
ZGFTO C*80 Name of graphics file to contain output Copy To
picture.
IFSAME L Logical for whether both pictures are in the same
graphics file:
.TRUE. = Pictures are in the same graphics file
.FALSE. = Pictures are in different graphics files
Output Arguments
Argument Data Description
Name Type and Default
XLLOT R Output x coordinate of lower left corner. Output if
IFCOFS = 3, overlay.
YLLOT R Output y coordinate of lower left corner. Output if
IFCOFS = 3, overlay.
RESCOT R Output rescaling factor. Output if IRESCL = 1 or
3.
XBOUND R Array, of length 4, containing the x coordinates of
the box around Copy From picture given in Copy
To coordinate space.
YBOUND R Array, of length 4, containing the y coordinates of
the box around Copy From picture given in Copy
To coordinate space.
Cutline
(XLNVEW,YLNVEW)
Copy To
Space
YLNVEW
YLONG
XOFFST FREEX
*
(XLLIN,YLLIN) (XLRIN,YLRIN)
(VXMIN,VYMIN)
YOFFST
(0.0,0.0) XLONG
XLNVEW
Cutline
(XLNVEW,YLNVEW)
Scaled Area
XOFFST (User units) FREEX
In General
TOP/BOTTOM Refers to longitude or eastings
LEFT/RIGHT SIDES Refers to latitude or northings
Graphic Routines
SIPCDL
Environment The ZPI/O and ZIGS environments must be initialized and the graphics
file containing the picture(s) to be deleted must be open before this
routine is called.
Input Arguments
Argument Data Description
Name Type and Default
NAMPIC C*80 Name of the picture to be marked for deletion.
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, problem reading picture header
2 = Error, problem writing picture header
3 = Error, picture not found
Graphic Routines
SIPCFL
Environment The ZPI/O and ZIGS environments must be initialized before this
routine is called. The graphics file is opened and closed by this routine.
Input Arguments
Argument Data Description
Name Type and Default
NAMZGF C*80 Name of the graphics file.
NUMPIC I Number of pictures to obtain information for.
Range Options: >0
INXPIC I Array, of length NUMPIC, containing the
indices of the pictures for which information is to
be obtained. Set INXPIC(1) to NUMPIC or a
large negative number to obtain all pictures.
Output Arguments
Argument Data Description
Name Type and Default
NAMPIC C*80 Array, of length NUMPIC, containing the names
of the pictures associated with the picture
indices.
NUMPCS I Number of pictures for which actual information
was obtained.
ISTAT I Status flag:
2 = Warning, picture does not exist for that
index.
1 = Warning, number of pictures requested is
too large. Resetting to actual number of
pictures.
0 = Operation was successful.
1 = Error, invalid picture index.
2 = Error, problem opening graphics file.
Graphic Routines
SIPCRN
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file opened before this routine is called.
Input Arguments
Argument Data Description
Name Type and Default
NAMOLD C*80 Name of the picture to be renamed.
NAMNEW C*80 New name for the picture.
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, old picture not found
2 = Error, new picture name blank or same as
old picture
3 = Error, no names on the file
4 = Error, new picture name already exists
5 = Error, problem renaming file
Graphic Routines
SIRPIC
Environment The ZPI/O and ZIGS environments must be initialized and a graphics
file opened before this routine is called.
Input Arguments
Argument Data Description
Name Type and Default
PICNAM C*80 Name of the picture.
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, opening picture
Graphic Routines
SIZGCM
Environment The ZPI/O and ZIGS environments must be initialized and the graphics
files closed before this routine is called.
Input Arguments
Argument Data Description
Name Type and Default
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, problem opening old graphics file
2 = Error, problem initializing copy
3 = Error, problem switching from one
graphics file to the other
4 = Error, problem opening new graphics file
5 = Error, problem compressing graphics file
Graphic Routines
SOGCLS
Name SOGCLS
Environment A call to S3GELM to obtain the next graphics element must be done
before this routine is called.
Input Arguments
Argument Data Description
Name Type and Default
NDXCLR I Color index.
Range Options: 0255
Output Arguments
Argument Data Description
Name Type and Default
REDPCT R Fraction red.
Range Options: 0.01.0
GRNPCT R Fraction green.
Range Options: 0.01.0
BLUPCT R Fraction blue.
Range Options: 0.01.0
ISTAT I Status flag:
0 = Operation was successful
1 = Error, no color table on picture
2 = Error, invalid color index
Graphic Routines
SOGEND
Environment This subroutine should be called after a picture has been completely
decoded. The ZPI/O output graphics environment must be initialized
before this routine is called.
Graphic Routines
SOGINT
Graphic Routines
SOGLGB
Environment The ZPI/O output graphics environment must be initialized before this
routine is called.
Output Arguments
Argument Data Description
Name Type and Default
QPCEND L Whether end of picture is found:
.TRUE. = End of picture found
.FALSE. = There are still more graphics features
File Utilities
Introduction
Use the File Utilities subroutines to work with master files and their
member files.
Internal Routines
S2DELE
Environment The ZPI/O and ZIMS environments must be initialized before you call
this routine.
S2FLST
Environment The ZPI/O and ZIMS environments must be initialized before you call
this routine.
Input Arguments
Argument Data Description
Name Type and Default
REPORT C*7 Type of report listing.
SUMMARY= List member filename, type, size
PARTIAL = List member filename, type, size, any
application program written history,
and file header
FULL = List member filename, type, size, any
application program written history,
file header, and field descriptors
NAME C*24 Prefix filename text string. Only files that have a
name starting with this prefix are listed.
TYPES C*4 Array (of length NUMTYP) containing the file
types to be listed.
BYNAME L Whether report is to be restricted by member
filename. Only files which have a prefix (or full
name) equal to the prefix filename string
(specified by NAME) are listed.
.TRUE. = Restrict listing based upon filenames
.FALSE. = Do not restrict listing based upon
filenames
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
1 = No master files attached
0 = Operation was successful
1 = Error, invalid report type
2 = Error, invalid number of file types
3 = Error, problem creating files listing
S2IZIM
Environment The ZPI/O environment must be initialized before you call this routine.
Call this subroutine only once in any one application.
Input Arguments
Argument Data Description
Name Type and Default
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Default = Status flag:
1 = Warning, runtime directory is being reset
to 20
0 = Operation was successful
14 = Sequential number of the master file that
could not be opened
5 = Error, opening scratch file
6 = Error, opening runtime directory
7 = Error, invalid master file number
S2LHIS
Note If IPRINT (the type of history to print) is set to zero, the routine prints
all standard invoked ZCL parameters. If set to one (1), it also prints
proposed ZCL parameters. If there is an exclamation mark (!) in the
printout, it is equivalent to a comment in ZCL. The resulting string of
commands, with minor modification, should run in ZCL.
Ancestor
Ancestor
Ancestor
Ancestor
Ancestor
Ancestor
Ancestor
Ancestor
NUMGEN = 3
Environment The ZPI/O and ZIMS environments must be initialized before you call
this routine.
Input Arguments
Argument Data Description
Name Type and Default
NAMFIL C*24 Name of the file whose history is to be printed.
MFDFIL I Number of the master file containing the input
file.
Range Options: 05
IHSFIL I History display for input file:
0 = Do not display the history information
1 = Display the history information
NUMGEN I Maximum generation to display. See the note.
Set NUMGEN to a negative number to print all
information.
Range Options: 010
LOGRPT I Logical unit on which to print the report.
Default = 6
Range Options: 099
IPRINT I Type of history to print:
0 = Print standard history parameters
1 = Print standard and proposed history
parameters
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
1 = Warning, there are no history records.
0 = Operation was successful.
1 = Error, invalid master file number or
master file is read-only.
2 = Error, duplicate files. Specify master file
number.
3 = Error, cannot find the file.
4 = Error, 5 files already in use.
S2MFAT
Function Attach a master file indicating either read-only or read-write file access
This subroutine attaches master files and reloads the runtime directory.
If at the beginning of the application there are no master files, then for
initialization purposes call the initialization routine with the number of
master files being zero and the names of the master files blanked.
This routine is equivalent to SIMFAT, but enables the user to indicate
read-only or read-write file access. SIMFAT assumes read-write
access.
Environment The ZPI/O and ZIMS environments must be initialized before you call
this routine.
This capability is not available for nondynamic allocating systems.
Input Arguments
Argument Data Description
Name Type and Default
NAMMFD C*80 Disk name of the master file to be attached.
IROFLG I Assigns file access permissions.
0 = Read/write access
1= Read-only access.
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
1 = Warning, this option is unavailable for
nondynamic systems
0 = Operation was successful
1 = Error, master filename is blank
2 = Error, 5 master files attached already
3 = Error, master file not found
4 = Error, locked by another user
S5DAFU
Function Obtain parameter, projection, and field information about a data file
This subroutine obtains information about a data file, such as file
information, parameter information, projection information, and field
descriptor information.
Environment The ZPI/O and ZIMS environments must be initialized before you call
this routine.
Input Arguments
Argument Data Description
Name Type and Default
Output Arguments
Argument Data Description
Name Type and Default
NAMFLD C*20 Array of the files field names (of length 50).
DEFFMT C*6 Array of default field output formats (length 50)
Modified Polyconic
Albers Equal Area
Standard Mercator
SIDFFD
Environment The ZPI/O and ZIMS environments must be initialized and a file
opened before you call this routine.
Input Arguments
Argument Data Description
Name Type and Default
Output Arguments
Argument Data Description
Name Type and Default
VECTOR R Array (of length 20) containing the following
information:
15 = Field name
6 = Field type
7 = Field output format type
8 = Field width
9 = Number of decimals for the field
10 = Index of the fields first word
11 = Number of words for the field
12 = Currently not used
13 = Null value
14 = Minimum allowed z value
15 = Maximum allowed z value
1619 = Currently not used
20 = Sort field index
SIDNFL
Function Retrieve information about a member file from the runtime directory
This subroutine takes the index number in the runtime directory for the
file and returns the name, type, and master file number for that file.
Environment The ZPI/O and ZIMS environments must be initialized before you call
this routine.
Input Arguments
Argument Data Description
Name Type and Default
NFILE I Number of files to be obtained.
Range Options: >0
INXFIL I Array (of length NFILE) containing the indices
of the files for which information is to be
obtained. Set INXFIL(1) = NFILE or a large
negative number to obtain all files.
Output Arguments
Argument Data Description
Name Type and Default
FILTYP C*4 Array (of length NFILE) containing the file type
for each member file, e.g., grid, data, etc.
SIEZIM
Environment The ZPI/O and ZIMS environments must be initialized before you call
this routine.
SIFCLO
Environment The ZPI/O and ZIMS environments must be initialized and a file
opened before you call this routine.
Input Arguments
Argument Data Description
Name Type and Default
LOGFIL I Logical file code for the member file to be
closed.
Range Options: 15
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, problem closing file
SIFLDR
Environment The ZPI/O and ZIMS environments must be initialized and the
member file opened before you call this routine.
Input Arguments
Argument Data Description
Name Type and Default
LOGFIL I Logical file code to access the file.
Range Options: 15
NUMFLD I Number of field descriptor to be read.
Output Arguments
Argument Data Description
Name Type and Default
SIFLDW
Environment The ZPI/O and ZIMS environments must be initialized and the
member file opened before you call this routine.
Input Arguments
Argument Data Description
Name Type and Default
FLDNAM C*20 Field name.
IFMT C*1 Output conversion type.
Range Options: A,I,F,E or G
LOGFIL I Logical file code to access the file.
Range Options: 15
NUMFLD I Number of the field descriptor to be written.
ITYPE I Type of field. (See Appendix B. File and Field
Codes in the Z-MAP Plus Reference Manual.)
NWORDS I Number of words in field.
INDEX I Position (word number) in the record where data
for this field starts.
IFWID I Field width (characters) for output.
IDEC I Number of significant digits to the right of
decimal for output.
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, writing direct access file
SIFRED
Environment The ZPI/O and ZIMS environments must be initialized and a file
opened before you call this routine.
Output Arguments
Argument Data Description
Name Type and Default
IWORD I Number of sequential words left to read.
DATA R Array (of length NWRDS) containing the data
(the data record read from the file).
ISTAT I Status flag:
0 = Operation was successful
1 = Error, positioning file
2 = Error, file error
3 = Error, end of file detected while
positioning file
4 = Error, number of words to read is zero
SIFWRT
Environment If this routine is used for random access I/O, the record to be written
must already exist on the file. This routine cannot extend a file except
through sequential writes.
Input Arguments
Argument Data Description
Name Type and Default
Output Arguments
Argument Data Description
Name Type and Default
SIIZIM
Environment The ZPI/O environment must be initialized before you call this routine.
This subroutine should be called only once in any one application.
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
1 = Warning, runtime directory is reset to 20
0 = Operation was successful
14 = Sequential number of the master file that
could not be opened
5 = Error, opening scratch file
6 = Error, opening runtime directory
SIMFAT
This subroutine attaches master files and reloads the runtime directory.
If at the beginning of the application there are no master files, then for
initialization purposes call the initialization routine with the number of
master files being zero and the names of the master files blanked.
Note The following example shows how the current master file maintenance
structure stores the location (logical units) of the master files:
Routine SIIZIM SIMFAT SIMFDT SIMFAT SIMFDT
Process Initialize Attach Detach Attach Detach
ZIMS with Third Second Fourth All
2 MFDs MFD MFD MFD MFDs
Result 1 = MFD 1 1 = MFD 1 1 = MFD 1 1 = MFD 1 1 = Scratch
2 = MFD 2 2 = MFD 2 2 = 2 = MFD 4 2 =
3 = Scratch 3 = Scratch 3 = Scratch 3 = Scratch 3 =
4 = 4 = MFD 3 4 = MFD 3 4 = MFD 3 4 =
5 = 5 = 5 = 5 = 5 =
Environment The ZPI/O and ZIMS environments must be initialized before you call
this routine. This capability is not available for nondynamic allocating
systems.
Input Arguments
Argument Data Description
Name Type and Default
NAMMFD C*80 Disk name of the master file to be attached.
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
1 = Warning, this option is unavailable for
nondynamic systems
0 = Operation was successful
1 = Error, master filename is blank
2 = Error, 5 master files attached already
3 = Error, master file not found
SIMFCM
This subroutine copies the files from one master file into another
master file, removing files that were marked for deletion.
Environment The ZPI/O and ZIMS environments must be initialized before you call
this routine.
Input Arguments
Argument Data Description
Name Type and Default
LUNCFM I Logical unit of master file to copy files from.
Range Options: 15
LUNCTO I Logical unit of master file to copy files into.
Range Options: 15
Output Arguments
Argument Data Description
Name Type and Default
NUMCPY I Number of member files copied.
ISTAT I Status flag:
0 = Operation was successful
1 = Error, problem compressing master file
SIMFCR
Environment The ZPI/O environment must be initialized before you call this routine.
Input Arguments
Argument Data Description
Name Type and Default
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, master filename is blank
2 = Error, master file FORTRAN unit is zero
3 = Error, opening FORTRAN file
4 = Error, writing to file
SIMFDT
Note The following example shows how the current master file maintenance
structure stores the location (logical units) of the master files:
Routine SIIZIM SIMFAT SIMFDT SIMFAT SIMFDT
Process Initialize Attach Detach Attach Detach
ZIMS with Third Second Fourth All
2 MFDs MFD MFD MFD MFDs
Result 1 = MFD 1 1 = MFD 1 1 = MFD 1 1 = MFD 1 1 = Scratch
2 = MFD 2 2 = MFD 2 2 = 2 = MFD 4 2 =
3 = Scratch 3 = Scratch 3 = Scratch 3 = Scratch 3 =
4 = 4 = MFD 3 4 = MFD 3 4 = MFD 3 4 =
5 = 5 = 5 = 5 = 5 =
Environment The ZPI/O and ZIMS environments must be initialized before you call
this routine.
This capability is not available for nondynamic allocating systems.
Input Arguments
Argument Data Description
Name Type and Default
NAMMFD C*80 Disk name of master file to detach. Blanked if all
master files, including the scratch file, are to be
detached. A new blank scratch file is attached.
The disk name for the scratch file is Scratch
File.
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
1 = Warning, this option is unavailable for
nondynamic systems
0 = Operation was successful
1 = Error, problem reinitializing ZIMS
2 = Error, no match for the disk master file
SIMFLS
Environment The ZPI/O and ZIMS environments must be initialized before you call
this routine.
Output Arguments
Argument Data Description
Name Type and Default
NAMMFD C*80 Array (of length 5) containing the disk names of
the attached master files.
NAMINT C*24 Array (of length 5) containing the internal names
of the attached master files.
MFDNUM I Number of master files attached.
NUMREC I Array (of length 5) containing the number of
records on the master file.
NUMUSE I Array (of length 5) containing the number of
records used.
ISTAT I Status flag:
1 = Warning, no master files attached
0 = Operation was successful
SIMFRN
Environment The ZPI/O and ZIMS environments must be initialized and the
appropriate master file attached before you call this routine.
Input Arguments
Argument Data Description
Name Type and Default
NAMMFD C*80 Disk name of the master file.
NAMINT C*24 New internal name of the master file.
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, the disk or internal master file
name is blank
2 = Error, the disk master file cannot be found
3 = Error, problem reading/writing internal
master file name
SINOPN
Environment The ZPI/O and ZIMS environments must be initialized before you call
this routine.
Input Arguments
Argument Data Description
Name Type and Default
NAMZIM C*24 Name of new member file. See the note above.
Output Arguments
Argument Data Description
Name Type and Default
NAMRET C*24 Name of new member file, with version number
added if there were duplicate files.
LOGFIL I Logical file code for the new member file.
Range Options: 15
ISTAT I Status flag:
1 = Warning, duplicate files. A version
number has been added.
0 = Operation was successful.
1 = Error, invalid master file number or
master file is read-only.
2 = Error, invalid version number.
3 = Error, 5 files already in use.
SIOOPN
Environment The ZPI/O and ZIMS environments must be initialized before you call
this routine.
Input Arguments
Argument Data Description
Name Type and Default
NAMZIM C*24 Name of old member file.
MFDNZM I Number of the master file containing the
member file. A zero or the appropriate master
file number can be used to search for the file.
Range Options: 05
IHISZM I History display for input file:
0 = Do not display history information
1 = Display history information
Output Arguments
Argument Data Description
Name Type and Default
IOLTYP C*4 Type of old member file. (See Appendix B. File
and Field Codes in the Z-MAP Plus Reference
Manual.)
LOGFIL I Logical file code for the old member file.
Range Options: 15
ISTAT I Status flag:
0 = Operation was successful
1 = Error, invalid master file number or
master file is read-only
2 = Error, duplicate files
3 = Error, cannot find the file
4 = Error, 5 files already in use
SIPRRC
Environment The ZPI/O and ZIMS environments must be initialized and the
member file must be opened before you call this routine.
Input Arguments
Argument Data Description
Name Type and Default
LOGFIL I Logical file code to access file.
Range Options: 15
Output Arguments
Argument Data Description
Name Type and Default
SIPRRD
Environment The ZPI/O and ZIMS environments must be initialized and the
member file must be opened before you call this routine.
Input Arguments
Argument Data Description
Name Type and Default
LOGFIL I Logical file code to access file.
Range Options: 15
Output Arguments
Argument Data Description
Name Type and Default
NFLDS I Number of data fields on the file.
NWORDS I Number of words on each data record.
NRECS I Number of data records in the file.
ISORTF I Index of primary sort field:
0 = None
XMIN D Minimum x coordinate for this file.
XMAX D Maximum x coordinate for this file.
YMIN D Minimum y coordinate for this file.
YMAX D Maximum y coordinate for this file.
ZNON R Null data value for the file.
ISTAT I Status flag:
0 = Operation was successful
1 = Error, reading direct access file
SIPRRG
Environment The ZPI/O and ZIMS environments must be initialized and the
member file must be opened before you call this routine.
Input Arguments
Argument Data Description
Name Type and Default
LOGFIL I Logical file code to access the file.
Range Options: 15
Output Arguments
Argument Data Description
Name Type and Default
SIPRWC
Environment The ZPI/O and ZIMS environments must be initialized and the
member file must be opened before you call this routine.
Input Arguments
Argument Data Description
Name Type and Default
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
SIPRWD
Environment The ZPI/O and ZIMS environments must be initialized and the
member file must be opened before you call this routine.
Input Arguments
Argument Data Description
Name Type and Default
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
SIPRWG
Environment The ZPI/O and ZIMS environments must be initialized and the
member file opened before you call this routine.
Input Arguments
Argument Data Description
Name Type and Default
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
SIRDPO
Environment The ZPI/O and ZIMS environments must be initialized and the
member file opened before you call this routine.
Input Arguments
Argument Data Description
Name Type and Default
LOGFIL I Logical file code to access file.
Range Options: 15
IWORD I Word number to position file to.
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
1 = Warning, end of file
0 = Operation was successful
1 = Error, invalid member file unit
2 = Error, invalid word position
3 = Error, positioning file
SIRDRN
Environment The ZPI/O and ZIMS environments must be initialized and the
member file opened before you call this routine.
Input Arguments
Argument Data Description
Name Type and Default
LOGFIL I Logical file code to access file.
Range Options: 15
IWORD I Word location at which to start reading.
NWORDS I Number of words to be read.
Output Arguments
Argument Data Description
Name Type and Default
ARRAY R Array (of length NWORDS) containing data that
was read.
ISTAT I Status flag:
0 = Operation was successful
1 = Error, invalid file unit
2 = Error, invalid word position
3 = Error, number of words to read is zero
4 = Error, reading file
SIRDSQ
Environment The ZPI/O and ZIMS environments must be initialized and the
member file opened before you call this routine.
Input Arguments
Argument Data Description
Name Type and Default
LOGFIL I Logical file code to access file.
Range Options: 15
NWORDS I Number of words to be read.
Output Arguments
Argument Data Description
Name Type and Default
IEOF I End of file:
0 = This record is not the last one
1 = End of file (EOF) reached. This record is
the last one.
ARRAY R Array (of length NWORDS) containing data that
is read.
ISTAT I Status flag:
0 = Operation was successful.
1 = Error, invalid member file unit.
2 = Error, number of words to read is zero.
3 = Error, reading file.
SIRHIS
Environment The ZPI/O and ZIMS environments must be initialized and the
member file opened before you call this routine.
Input Arguments
Argument Data Description
Name Type and Default
LOGFIL I Logical file code to access file.
Range Options: 15
IHREC I Number of the history record to be retrieved or
zero for all history records.
Output Arguments
Argument Data Description
Name Type and Default
SIWHIS
Environment The ZPI/O and ZIMS environments must be initialized and the
member file opened before you call this routine.
Input Arguments
Argument Data Description
Name Type and Default
INFHIS C*80 Array (of length NORECS) containing the
history information.
NORECS I Number of records to be written.
Range Options: 120
LOGFIL I Logical file code to access member file.
Range Options: 15
Output Arguments
Argument Data Description
Name Type and Default
NTHREC I Total number of history records on the member
file.
ISTAT I Status flag:
0 = Operation was successful
1 = Error, record number invalid
2 = Error, writing the history information
SIWRPO
Environment The ZPI/O and ZIMS environments must be initialized and the
member file opened before you call this routine.
Input Arguments
Argument Data Description
Name Type and Default
LOGFIL I Logical file code to access file.
Range Options: 15
IWORD I Word number at which to position the file.
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, invalid member file unit
2 = Error, invalid word position
3 = Error, positioning file
SIWRRN
Environment The ZPI/O and ZIMS environments must be initialized and the
member file must be opened before you call this routine.
Input Arguments
Argument Data Description
Name Type and Default
LOGFIL I Logical file code to access file.
Range Options: 15
IWORD I Word location at which to start writing.
NWORDS I Number of words to be written.
ARRAY R Array (of length NWORDS) containing the data
to be written.
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, invalid member file number
2 = Error, invalid word position
3 = Error, number of words to write is zero
4 = Error, writing file
SIWRSQ
Environment The ZPI/O and ZIMS environments must be initialized and the
member file opened before you call this routine.
Input Arguments
Argument Data Description
Name Type and Default
LOGFIL I Logical file code to access file.
Range Options: 15
NWORDS I Number of words to be written.
ARRAY R Array (of length NWORDS) containing the data
to be written.
Output Arguments
Argument Data Description
Name Type and Default
ISTAT I Status flag:
0 = Operation was successful
1 = Error, invalid member logical file
2 = Error, number of words to write is zero
3 = Error, writing file
Appendix A.
ZIGS Overview
Introduction
The Z-MAP Interactive Graphics System (ZIGS) is a comprehensive
graphics software package that operates with a broad range of graphics
peripherals. As a ZPI/O programmer, you will be most concerned with
placing graphics into or extracting graphics from a Z-MAP Graphics
File (ZGF). This file contains graphics in a packed form and, like a
metafile, is device independent. Many of the routines in the Graphics
Utilities section are involved with ZIGS operations.
Picture Components
Each picture is composed of a set of graphics segment types (e.g.,
contours, borders, cross-section lines, lithology columns, etc.) which
are often called logical graphics blocks (LGBs) or graphics features.
An LGB (graphics feature) is therefore a marker identifying some
specific type of graphic data.
Contours, posted well data, title block components, seismic lines and
other features can also be grouped together in a single LGB.
All types of LGBs used in ZPI/O can be broken down into four groups
of graphic primitives: lines, text, symbols and polygons. Any number
of primitives can be written to an LGB, but picture editing is less
efficient if massive amounts of graphics are created in a single LGB. A
list of allowed LGB types can be found in Appendix A. Graphics
Feature Codes in the Z-MAP Plus Reference Manual.
Headers
Each ZGF, picture and LGB has a header which stores pertinent
information. The ZGF header contains file identification text, file status
information, the number of records allocated to the file, and a pointer to
the next unused record.
The picture header contains the name of the picture, status information,
a pointer to the first LGB header in that picture, the location of the next
picture header, and the display parameters which define the scale and
area of the plot.
Also included in the LGB header are pointers to the actual primitive
data, connections to both previous and later versions of the LGB, a
display priority number and the coordinates of the minimum enclosing
box around the LGB with lines parallel to the x and y axes.
ZGF Header
Header Picture 1
LGB 1
Primitive 1
Primitive 2
Primitive n
LGB 2
Primitive 1
Primitive 2
Primitive m
LGB K
Header Picture z
If SICOMM or SIISIL is not the first ZPI/O routine called, you could get
serious errors and many types of errors when you call other ZPI/O routines.
C
C INITIALIZE SYSTEM-WIDE COMMON STORAGE
C
C
C
CALL SIIZIG
C
C
ZGFNAM = /disk/directory/my.zgf
NEWZGF = NEW
HISNEW = TESTING ZPIO INPUT GRAPHICS ROUTINES
C
CALL SIIZGF (ZGFNAM, HISNEW, NEWZGF, HISOLD, ISTAT)
IF (ISTAT .GT. 0) GO TO 800
4. Initialize a picture.
Call S3IPIC to open either a new or an old 2D (baseplane) picture.
If the picture is new, input arguments must include the picture
name, projection information, information on the Area of Interest
(AOI) to be mapped and scaling information. If the picture is an
old one (it has been previously created), you must only supply the
picture name and all other information is returned from S3IPIC.
Alternatively:
Call S3NPIC to open a new picture. All the same information as
described above is needed here also.
Call S3OPIC to open an old picture supplying only the picture
name. All information about the old picture is returned here
also.
Call SIRPIC to open a picture in read-only state. You supply
the picture name, but no information about the picture is
returned.
C
PICNAM = DEFAULT GRAPHICS
IFOLD = NEW
IFABSC = 0
IFPRJ = 1
IBRTIP = 2
IABSSC = 0
LONMND = 0
LONMNM = 0
LONMNS = 0
LONMXD = 0
LONMXM = 0
LONMXS = 0
LATMND = 0
LATMNM = 0
LATMNS = 0
LATMXD = 0
LATMXM = 0
LATMXS = 0
IHEM = 0
IUTMCD = 0
IPJCOD = 0
ISPCOD = 0
IUNCOD = 0
IRADTY = 0
XOFFST = 1.0
FREEX = 1.0
YOFFST = 1.0
FREEY = 1.0
VXMIN = 0.0
VXMAX = 10.0
VYMIN = 0.0
VYMAX = 10.0
XSCMAP = 1.0
YSCMAP = 1.0
XLONG = 10.0
YLONG = 10.0
BOTPAR = 0.0
TOPPAR = 0.0
REFLAT = 0.0
SFLAT = 0.0
REFLON = 0.0
SFLON = 0.0
FNORTH = 0.0
FEAST = 0.0
UNTFAC = 0.0
AXISA = 0.0
AXISB = 0.0
AZMTH = 0.0
SCALE = 0.0
XLNVEW = 0.0
YLNVEW = 0.0
C
CALL S3IPIC (PICNAM, IFOLD, IFABSC, IFPRJ, IBRTIP,
1 IABSSC, LONMND, LONMNM, LONMNS, LONMXD,
2 LONMXM, LONMXS, LATMND, LATMNM, LATMNS,
3 LATMXD, LATMXM, LATMXS, IHEM, IUTMCD,
4 IPJCOD, ISPCOD, IUNCOD, IRADTY, VXMIN,
5 VXMAX, VYMIN, VYMAX, XOFFST, FREEX,
6 YOFFST, FREEY, XSCMAP, YSCMAP, XLONG,
7 YLONG, BOTPAR, TOPPAR, REFLAT, SFLAT,
8 REFLON, SFLON, FNORTH, FEAST, UNTFAC,
9 AXISA, AXISB, AZMTH, SCALE, XLNVEW,
. YLNVEW, ISTAT )
IF (ISTAT .GT. 0) GO TO 800
5. Initialize an LGB.
Call SIGSOP to open a new LGB (graphics feature) on the
currently opened picture and currently opened ZGF. The only
input argument to this routine is the code assigned to the type of
graphic segment to be opened. You can find these codes in
Appendix A. Graphics Feature Codes in the Z-MAP Plus
Reference Manual.
C
C OPEN BORDER PICTURE SEGMENT
C
LGBTYP = 1
CALL SIGSOP(LGBTYP, ISTAT)
IF (ISTAT .GT. 0) GO TO 800
Attribute Routine
line color SIGLCL
line type SIGLTY (solid, bold, dashed)
dash and hachure size SIGLPM
line width SIGLWD
Attribute Routine
marker color SIGMCL
marker height SIGMHT
marker type SIGMTY
The marker type is the symbol code to use. You can find it in
Appendix C. Symbols, Fonts, and Line Patterns in the
Z-MAP Plus Reference Manual.
If the type of segment contains text, the following attributes can be
assigned:
Attribute Routine
text color SIGTCL
text font SIGTFO
text height SIGTHT
text justification SIGTJU
text rotation SIGTRO
C
C SET DEFAULTS
C
CALL SIGPDF(
1 KLNCLR, KLNTYP, KMKCLR, KMKTYP, KTXTCL,
2 KTXTFO, KTXTJU, KPOLCL, KSCLTY, WDLINE,
3 HTMARK, HTTEXT, ROTEXT, DSHLEN, DSHGAP,
4 HSHLEN, HSHGAP, HSHWAY, ISTAT)
IF (ISTAT .GT. 0) GO TO 800
C
C DO A BORDER USING LINES
C
NUMPTS = 5
XCORS(1) = 1.0
YCORS(1) = 1.0
XCORS(2) = 11.0
YCORS(2) = 1.0
XCORS(3) = 11.0
YCORS(3) = 11.0
XCORS(4) = 1.0
YCORS(4) = 11.0
XCORS(5) = 1.0
YCORS(5) = 1.0
C
CALL SIGLIN(NUMPTS, XCORS, YCORS, ISTAT )
IF (ISTAT .GT. 0) GO TO 800
C
C CLOSE GRAPHIC SEGMENT
C
CALL SIGSCL(ISTAT)
IF (ISTAT .GT. 0) GO TO 800
C
C CLOSE THE FIRST PICTURE
C
CALL SIEPIC (ISTAT)
IF (ISTAT .NE. 0) GO TO 800
C
C CLOSE THE GRAPHICS FILE
800 CALL SIEZGF
If the ZGF is not closed before exiting the program, you might have
problems when you try to use the ZGF again.
CALL SIEZIG
3. Obtain an LGB.
Call SOGLGB to return the first LGB (graphics feature) header.
An output argument tells you what type of graphic segment has
been retrieved. If you do not want to add this type of graphics
feature to your application, call SOGLGB again to retrieve the
next LGB header.
Appendix B.
ZIMS Overview
Introduction
Master File
The basic ZIMS structure is the master file, a direct access binary file
with fixed record length. Each master file is a collection of independent
member files. The general structure of a master file is illustrated below.
MFD Header
Header File 1
Header File 2
Field Descriptor 1
Field Descriptor 2
Field Descriptor n
Data Record 1
Data Record n
Member File
Each member file is conceptually separate from the other files and can
be used without regard to the other member files. Several types of files
have been defined, including grid files, data files, vertex files and fault
files. (For a list, see Appendix B. File and Field Codes in the
Z-MAP Plus Reference Manual. For examples of how these files are
structured, see Appendix D. Import/Export in the Z-MAP Plus
Reference Manual.)
In addition to the actual data, each member file can contain other
optional information. A history block contains information about other
files which were used in creating the fields, and can include text
descriptions input by the user. A parameter record contains descriptive
numerical information about the data in the file, and data field
descriptors contain information about the various fields in the data file.
There is no limit to the number of member files which can be in a
master file. Files can be added or deleted during a run. Each member
file in a given master file must have a unique name. If you try to create
a new member file in a master file which already has a member file by
that name, the ZPI/O routines place a version number (V-02, V-03,
etc.) in columns 21-24 of the member filename. The new member file
then has to be accessed by the name including version number. If the
version number is left off the name when accessing it later, the old or
original member file by that name is used.
Each member file has a 32-word directory associated with it, which is
sorted on the master file. At runtime, all directory entries from all the
master files are combined in one runtime directory. If a member file is
actually in use, a copy of the directory is placed in memory. The
directory contains the name and length of the file, and points to various
parts of the file and other information.
Data files also contain Field Descriptor records. One field descriptor
record is needed for each field on the dataset. Each record contains the
field name, field type, default print information, location in the record,
the ZNON value, and minimum and maximum allowed values.
If SICOMM or SIISIL is not the first ZPI/O routine called, you could get
serious and many types of errors when you call other ZPI/O routines.
Call SIFLDW to write the field descriptor records. The logical file
code is returned when the file is opened.
Write Order
The field descriptor records must be written to a new file before the data
records are written to ensure correct file usage.
The steps for reading data from a ZIMS member file are:
1. Initialize ZPI/O environment.
Call SICOMM or SIISIL to initialize the common blocks, logical
units, etc., used in the entire ZPI/O system.
If SICOMM or SIISIL is not the first ZPI/O routine called, you could get
serious and many types of errors when you call other ZPI/O routines.
C
Appendix C.
Logical Unit Assignment
Landmark Graphics
Logical Unit Assignment Table
Description Logical Symbolic Common Defining Data Maximum Record Record File
Unit Name Block Routine Format Size Format Length Allocation
Volumetrics output 9 LFRMAT (none) ZVOLUM Character 200 rec. Fixed 132 byte Permanent
Blocked (if used)
Import Task formatted data input/outputmay be 10 LUNFMT (none) ZXFGRD Character User Permanent
unused. ZXFDAT Specified (if used)
ZXFSUP
ZIMS Runtime File Directory (RTD), contains a list 20 LUNDIR DIRECT ZILDDR Binary 250 rec. Direct 32 word Run
of all datasets accessed in this run. Temporary
ZIMS Master Files (MFD), contain all data listed in 21 (none) FBUFCM ZILDDR Binary 500 rec. Direct 512 word Permanent
RTD above. 22 FBUFCM Access
23 FBUFCM
24 FBUFCM
ZIMS Scratch MFD used for run-temporary 25 (none) FBUFCM ZILDDR Binary 500 rec. Direct 512 word Run
datasets. Access Temporary
ZIMS Scratch file used for MFD file deletion and 26 LUNNEW (none) ZIGRCL Binary 500 rec. Direct 512 word Run
clean up. 26 LUNSCR (none) ZIMFDD Access Temporary
Appendix C. Logical Unit Assignment
ZIGS Graphics File (ZGF), contains new or old 27 LZGF ZGFCOM ZGFINF Binary 500 rec. Direct 128 word Permanent
plots. 27 LUNQ (none) ZMDSPL Access or Run
Temporary
ZIGS auxiliary Graphics File used for copy and 28 LUNAUX (none) ZGCOPY Binary 500 rec. Direct 128 word Permanent
cleanup. Access (if used)
ZIGS color table 39 LUNIT (none) ZDINIT Character 500 rec. Fixed/ 80 byte Permanent
Access
Log Curve Default File 51 LDFLG (none) SLOPEN Character Fixed/ 80 byte Permanent
LUNLOG SCLOGU SGCOMN Blocked
Lithology and Cross-Section Default File 52 LDEFS (none) SLOPEN Character Fixed/ 80 byte Permanent
LUNDEF SCLOGU SGCOMN Blocked
Definition File 53 LNLST (none) SLOPEN Character Fixed/ 80 byte Permanent
LGNLST SCLDMX SLCOMM .Blocked
Lithology Data File 55 LLITH (none) SLOPEN Character Fixed/ 80 byte Permanent
LUNLIT SCLDMX SLCOMM Blocked
Tops Data File 56 LTOPS (none) SLOPEN Character Fixed/ 80 byte Permanent
LUNTOP SCLDMX .SLCOMM .Blocked
Log Curve Data File 57 LLOGS (none) SLOPEN Character Fixed/ 80 byte Permanent
LUNLOG SCLDMX SLCOMM Blocked
Analysis Data File 58 LANLY (none) SLOPEN Character Fixed/ 80 byte Permanent
LUNANL SCLDMX SLCOMM Blocked
Core Data File 59 LUNCOR SCLDMX SLCOMM Character Fixed/ 80 byte Permanent
Blocked
Well Survey Data File 60 LWSV (none) SLOPEN Character Fixed/ 80 byte Permanent
LUNWSR SCLDMX SLCOMM Blocked
Landmark Graphics
R2003.0
Landmark Graphics Z-MAP Plus I/O Access Library
Index
Symbols D
.assemble picture debugging option
copy to space vs. copy from space 151 using 29
defaults
set field descriptors 184186
A set for lines, markers, text, and polygons 129131
A-MAP Plus I/O define coordinate system 134
example program 1424 delete
argument name graphics feature from picture file 135
variable vs. constant 29 mark picture for 159
assemble picture 149152 member file from master file 170
copy to space vs. copy from space 157 detach one or all master files 202
compute four corners for 155158 display area of a picture 100, 108, 144
attach master file 177, 198 display/plot hardcopy type picture 7273
draw
connected line segments 121
C lines using a member file 74
lines using array inputs 70
close
markers 78
current graphics feature 133
shaded or colorfilled polygon 132
files 30
text 142
graphics file 118
last picture opened 117
master files 188 E
member file 189
ZIMS files 40 example program
color table 224 to list members of a graphics file 1013
compress to list members of a master file 89
graphics file 163
master file 199 G
compute
control point file statistics 5658 graphics feature
four corners of one picture relative to another picture defined 223
for assembly/overlay 155158 graphic primitives 224
grid file statistics 4648 set attributes 229230
statistics for field 5960 graphics file
convert from x,y to latitude/longitude 4953 close 133
copy all or part of a picture to another picture 153154 compress 163
create new master file 200 header 224
create new member file 32, 241243 open 145
transfer picture from neutral file to 79
transfer picture to neutral file from 80164
graphics files
list members of, example program 1013
open R
files 30
graphics file 145 read
new graphics feature 136 data parameter record 209
new member file 32, 205 field descriptor 190191
new or old picture 85144 from member file 32, 244245
new picture 92100 from member file at random location 216
old member file 206 from member file sequentially 31, 217
old picture 101108 general data or contour parameter record 207208
old picture read only 162 grid 34, 246
overlay maps or generate index maps 147148 grid parameter record 210
overlay picture 149152 history information from member file 218
copy to space vs. copy from space 151, 157 position member file for sequential 215
compute four corners for 155158 record from member file 194
rename
internal name of master file 204
P picture 161
reset debug print flag 37
picture
retrieve information
copy to space vs. copy from space 151, 157
about member file from run time directory 187
copy all or part to another picture 153154
header 224
mark for deletion 159 S
obtain graphics element from 8184
obtain graphics from 233234 set
obtain information 109115 dash line and hachure mark parameters 122
obtain name by picture index 160 default field descriptors 184186
obtain next graphics feature for 168 defaults for lines, markers, text, and polygons 129
open new 92100 131
open new or old 85144 line color 120
open old 101108 line type 123
open old, read only 162 line width 124
place graphics 226232 marker color 125
projection arguments vs. projection type 107 marker height 126
rename 161 marker type 127
transfer from graphics file to neutral file 80164 polygon fill color 128
transfer from neutral file to graphics file 79 text color 137
polygon text font 138
draw shaded or colorfilled 132 text height 139
set defaults 129131 text justification 140
position member file text rotation 141
for sequential read 215 status flag, using 30
for sequential write 220 subroutine descriptions, presentation of information 25
28
T Z
terminate Z-MAP Interactive Graphics System
ZPI/O environment 39 file structure 223225
ZPI/O output graphics environment 166 file structure example 225
Zycor Interactive Graphics Environment (ZIGS) 119 programmers guide 226234
text Z-MAP Plus I/O
draw 142 program structure 6
set color 137 ZPI/O environment 38
set defaults 129131 Zycor Information Management System
set font 138 field descriptor record 240
set height 139 file structure 236240
set justification 140 file structure example 236
set rotation 141 parameter record for data 239
transfer parameter record for grids 238
contents (pictures) of neutral file to graphics file 79 programmers guide 241246
information from external file into member of master Zycor Information Management System (ZIMS)
file 4445 initialize and attach master files 173174, 197
information from member of master file to external file Zycor Interactive Graphics Environment (ZIGS)
6162 initialize 146
pictures from graphics file to neutral file 80164
V
variable argument name 29
W
write
data parameter record 213
field descriptor 192193
from member file sequentially 31
general data or contour parameter record 211212
grid 34, 246
grid parameter record 214
history records to member file 219
position member file for sequential 220
record to member file 195196
to member file at random location 221
to member file sequentially 222