Path: utzoo!utgpu!water!watmath!clyde!rutgers!mit-eddie!uw-beaver!cornell!rochester!bbn!uwmcsd1!ig!agate!ucbvax!FHCRCVAX.BITNET!JOE From: JOE@FHCRCVAX.BITNET (Joe Meadows) Newsgroups: comp.os.vms Subject: RE: What is SDL? Message-ID: Date: 27 Jan 88 18:18:00 GMT Sender: usenet@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 110 >It would be highly intresting to see some SDL definitions, just >to get an idea about it. Is there anyone out there who can demonstrate >how to define, say, SYS$GETJPI or something? Okay, from the Fiche, here's the SDL for SYS$GETJPI: (note - discussion of SDL project at end of message) /* $GETJPI /* Get Job process information /* (and so on...) ENTRY SYS$GETJPI ALIAS $GETJPI PARAMETER ( LONGWORD UNSIGNED VALUE NAMED EFN DEFAULT 0, {/* TYPE(EFNUM), LONGWORD UNSIGNED NAMED PIDADR IN OUT DEFAULT 0, {/* TYPE(PROCID), CHARACTER DESCRIPTOR NAMED PRCNAM IN DEFAULT 0, {/* TYPE(PROCNAME), ANY NAMED ITMLST IN, {/* TYPE(ITEMLIST), QUADWORD UNSIGNED NAMED IOSB OUT DEFAULT 0, {/* TYPE(IOSB), ADDRESS(ENTRY) NAMED ASTADR DEFAULT 0, {/* TYPE(ASTADR), LONWORD UNSIGNED VALUE NAMED ASTPRM DEFAULT 0, {/* TYPE(USERPARM) ) RETURNS LONGWORD; {/* TYPE(CONDVALU); And here's a structure definition (for $STSDEF): module $STSDEF; /* Macros to define system service failure and status codes /* (and so forth - down to the meat) aggregate STSDEF union prefix STS$; STSDEF_BITS0 structure fill; SEVERITY bitfield mask length 3; /* severity code COND_ID bitfield mask length 25; /* condition id CONTROL bitfield mask length 4; /* control bits end STSDEF_BITS0; STSDEF_BITS1 structure fill; SUCCESS bitfield mask; /* success FILL_1 bitfield length 2 fill prefix STSDEF tag $$; /* skip severity level MSG_NO bitfield mask length 13; /* message number end STSDEF_BITS1; STSDEF_BITS2 structure fill; FILL_2 bitfield length 3 fill prefix STSDEF tag $$; /* skip severity level CODE bitfield mask length 12; /* code FAC_SP bitfield mask; /* 1 if facility specific FILL_3 bitfield length 11 fill prefix STSDEF tag $$; CUST_DEF bitfield mask; /* 1 if subsystem is customer (or css) defined INHIB_MSG bitfield mask; /* 1 if message should not be printed FILL_4 bitfield length 3 fill prefix STSDEF tag $$; /* reserved control bit s end STSDEF_BITS2; STSDEF_BITS3 structure fill; FILL_5 bitfield length 16 fill prefix STSDEF tag $$; /* skip message # FAC_NO bitfield mask length 12; /* facility is 12 bits FILL_6 bitfield length 4 fill prefix STSDEF tag $$; /* control bits end STSDEF_BITS4; /*+ /* define severity codes /*- constant WARNING equals 0 prefix STS tag $K /* Warning constant SUCCESS equals 1 prefix STS tag $K /* Success constant ERROR equals 2 prefix STS tag $K /* Error constant INFO equals 3 prefix STS tag $K /* Info constant SEVERE equals 4 prefix STS tag $K /* Severe end STSDEF; end_module $STSDEF; !------------------------------------------------------------- Of course, the above isn't shipped with VMS, at least, not in that form. Apparently SDL can read the above file, and write out a binary definition file (which is much smaller), and these short binary files get included in the VMS distribution. Nowhere is this file format documented (unless I have somehow overlooked it, I looked through the fiche for anything to do with it and found nothing). However, the command SDL/NOPARSE/DUMP will read one of these files (they are all stored in the text library SYS$SHARE:STARLETSD) and create a dump for you, and if you paw through the fortran or basic installation tapes you can find utilities that can be used with SDL/NOPARSE/LANGUAGE=(), or if you are lucky enough to have VWS than apparently you get all the major language modules for use with SDL/NOPARSE/LANGUAGE=(). Not having VWS, and wanting more control over the looks of the include/header files, I have been working on writing replacement modules for use with SDL/NOPARSE/LANGUAGE=(), and have a working DUMP module, and am currently working on a C module. I hope to be able to create a document explaining how to do this, and I will post it and the code I come up with in the near future. Until then, you can contact me for "pre-release" copies. My hopes are to get several people to work on several different modules (i.e. MODULA, PASCAL, etc.) and bring all the work together in one place, submitting it to DECUS all at the same time. The code I have for the DUMP module and C module is in C. I plan on writing a document explaining the structures and how things get glued together (as soon as I know how they are!) and I would hope that people writing modules for other languages might write in the language they wish to create include/header/definition files for. If there is enough interest, I will post the code to the net, otherwise it will just make it to the DECUS library. I will keep the net posted on the progress. Cheers, Joe Meadows joe@fhcrcvax p.s. I want to create a module that will create "routine templates" for use in TPU, if anybody has some ideas, let me know.. I was just thinking of creating an indexed file, indexed by routine name, with the template format in text form as the rest of the record... and having a call_user routine to read the indexed file.. -------