IDMS/SQL News | ||
Vol 10.2 Technical Information for Mainframe and IDMSâ Users October 2001 |
IDMS Release 15.0 is Available!According to the information from clients, IDMS Release 15.0 is available. There are more support for Sysplex, more dynamic sysgen features, Table Procedures and the ability to use subquery in the WHERE clause of an UPDATE (SQL) statement. More information in the coming days. |
IDMS Manuals available in Adobe PDF formatIDMS Manuals are now avilable in PDF format. This is a welcome move. One can say goodbye to the totally unfriendly IBM Bookmanager format! Licensed Clients can download the manuals straight from the Web. Congratulations to the IDMS Developement and Documentation Personnel. |
Topics of The Week's Summary - Details at 2001-tow02.htm | |
Code Red Attacks Servers and Routers!There has been some confusion about the destructive power of Code Red. First it was said that only MS IIS is affected. Now we have solid proof that even Routers have been affected. An open hole is created in the routers through which other viruses can get in! Dot.com venture Arzoo collapses! - Summer 2001Sabeer Bhatia, did the graveside honors by announcing the closure of his dream project Arzoo.com. He sparked off a gold rush in dotcom industry when Microsoft's Bill Gates shelled out $400 million for his Hotmail free e-mail service. Hewlett-Packard acquires Compaq! - Aug 2001HP will acquire Compaq for $25 billion. The combined revenue will be about $87 billion making it on the same level as IBM! IDMS/SQL welcomes the acquisition of the third class company. |
Where is the Java Magic? Sun Micro posts loss, sales drop 43% - October 2001SAN FRANCISCO: Network computer maker Sun Microsystems reported on Thursday its second quarterly loss in a row after a string of profits since 1989, a fall from grace the company said was accelerated by effects of the September 11 attacks on a slow economy. New York Tragedy - Could have been avoided?- September 2001 While everyone is trying to come to terms with the New York Tragedy, many IDMS Programmers are wondering: Could a surveillance system, based on a proper database, have foreseen and avoided the tragedy? No Breakup of Microsoft! - Sept 2001The U.S. Justice Department said Thursday it would not seek to break Microsoft in two during the next phase of the software maker's landmark antitrust case. |
Optimization of Index and OLQ !If you have system-owned indexed set and wants to optimise the access based on key values, it is possible but there are some pitfalls. Take for example EMPLOYEE record with EMP-NAME-NDX. The index is on EMP-LAST-NAME and EMP-FIRST-NAME (suffix 0415 omitted). GET ALL EMPLOYEE IN EMP-NAME-NDX WHERE EMP-LAST-NAME-0415 = 'FINN' AND EMP-FIRST-NAME-0415 = 'PHINEAS' OLQ 098006 00 1 whole lines and 0 partial lines in report. OLQ 098007 00 57 records read. 1 records selected. Basically, OLQ sweeped the whole index and read all the records before selcting one. But look at the following GET ALL EMPLOYEE IN EMP-NAME-NDX WHERE SORTKEY=('FINN','PHINEAS') OLQ 098006 00 1 whole lines and 0 partial lines in report. OLQ 098007 00 1 records read. 1 records selected. You get the same result based on the key! Index is not sweeped. Not all record are read. Just one is read! EMPLOYEE database you may not see the big difference because it is so small. If it is large with 100.000 records or more, the difference in times will be substantial. The first query in that case would have taken minutes (5-10 minutes) depending upon the size and spread of pages, whereas the second one would have taken 1-2 seconds! One important factor to note is that SQL (IDMS/SQL) Optimizer would have optimized even the first usage. But OLQ does not. OLQ Menu Mode may or may not use index depending upon whether you give a valueagainst the index field. We failed to use index in the case of EMPLOYEE in the following menu mode example.
We tried the same thing with SKILL Record, trying s dummy selection criteria on skill-name-0455
This time it used INDEX Sweep instead of Area Sweep. Unlike the EMPLOYEE record here the index is on a single field.
|
|||||
Mapless Dialog and Error MessagesA user dialog has abended and here we have a message from OLP (IDMS System Log) IDMS DC177036 V3 ** SYSTEM
FAILED - P123A100-PM IDMSSTAT: 0326 |
Back
to Basics:How to Add a Record in IDD!Now that many sites do not have a well-designed curriculum for IDMS education, many new comers are learning things from the 'old hands'. This is alright if the 'old hands' know IDMS and not alright when the 'old hands' are handling the product as something 'old' and 'to be replaced soon'. First thing to remember is to use IDD Command Mode. There is one menu mode called IDDM. We do not recommend using that. If you know a few simple commands like 'DISPLAY and ADD', you can do many things in IDD command mode far more easily than than IDDM. One can add a record using the COBOL like syntax ADD REC OFFICE. This works, but is not recommended unless you know what you are doing. This will create record. And it will also create element definitions if they do not already exist in IDD. If you delete record OFFICE at this stage, element definitions are not deleted. If the element name already exists it will be used. If the name exists and the PICTURE does not match, IDD will automatically create a new definition with the element name VERSION 2 or next higher value. So if you domat this stage, DEL REC OFFICE. Then an element OFFICE-ID VERSION 2 will be created to accomodate PIC X(4). A display in IDD will verify this. DIS REC OFFICE. The RIGHT way to add a RECORD in IDD !Having seen a little bit of COBOL like record addition, we have to introduce the right way of creating records. The way to go is - create element defintions - create group elements if any using SUB ELEMENTS clause - create Records So one would follow the sequence ADD ELE OFFICE-ID PIC X(4). ADD ELE OFFICE-NAME PIC X(20). ADD ELE DAG PIC 99. ADD ELE MONTH PIC 99. ADD ELE YEAR PIC 9(4). ADD ELE DATO-1 SUB ELEMENTS ARE (YEAR, MONTH, DAG). ADD REC OFFICE. REC ELE OFFICE-ID. REC ELE OFFICE-NAME. In case an element already exists in dictionary you get an error message. ADD ELE DATO-1 SUB ELEMENTS ARE (YEAR, MONTH, DAG). Either you can use the existing version or you can create a new version or change to a new name. We modify the record definition to include the date-1 field. MOD REC OFFICE. REC ELE DATO-1. One can later verify the definition by displaying the record. DIS REC OFFICE or still better in COBOL format as DIS REC OFFICE WITH RECEL or DISPLAY RECORD OFFICE WITH COBOL AS
SYN. Note that we chose to use the existing definition of element DATO-1. Overriding the basic PICTURE of an elementHere we saw that when you include an element in a record, the PICTURE is copied. But if we want to use another PICTURE, IDD creates a new version of the same element. The question is : Is it possible to avoid having this extra element definition ? Yes, you can copy an element into a RECORD and use a PIC which is different from that of the base element. To start with let's assume that there exists an element called OFFICE-ID already in IDD *+ ADD Now add the record. ADD REC OFFICE. The record is added with OFFICE-ID as PIC 9(4) though the element in IDD will still say PIC 9. DIS REC OFFICE.
|
The difference is OLTP!We have repeatedly pointed out in these columns the inherent differences between a true OLTP system and a system which mimics an OLTP environment. Many web-based applications with Java (class, servlet, JSP, Beans, EJB) appears to behave like an OLTP environment. But many of them are far away from real OLTP. With a plethora of real code running behind the Web and Webservers and asynchronous applications like MQSeries interfacing in between and with the usage of replicated (=duplicated) databases, it is not possible to give true OLTP. It's a simple truth Java Programmers either forget or not aware of, even now! So many occasions you see messages like (reminding you the shortcomings of such solutions!)
|
An Introduction to Interactive Processing!Well, many of us old-timers learned programming using the IBM 360 and older machines. The author had been fortunate enough to have an IBM S/370-155 at the University, running OS/VS1. In the early 70s this was a 'formiddable' machine! The first one to support Virtual Storage upto 16M, DAT (dynamic address translation), true multi-programming etc. The leap from S/360 to S/370 was enormous. OS/VS1 even supported IDMS (Batch then). Even with S/370 machine, we had to use punched cards! Students waited in queue to get their reserved slots at the punching machines. Submit a small FORTRAN program to WATFIV compiler (the speedy way of compiling FORTRAN using the University of Waterloo Compiler) and wait half-a-day only to get a synatx error message on a piece of paper. Those who were 'advanced' tried to submit a PL/1 program. With PL/1, FORTRAN, LIST, PASCAL and SNOBOL available on the machine, no one liked COBOL and no one tried COBOL! So with S/370 in 1974 it was all batch. Then there appeared an HP machine (the size of a type writer) with a paper console, where you could try some interactive programming with BASIC. We tried some simple mastermind (guessing a number). BASIC was a great language. Simple and interactive! So the following BASIC program which we probably tried in 1974 is still valid on a GW-BASIC interpreter on a PC-DOS. [Incidentally GW stands for none other than Gates, William!] 10 PRINT "Type a Number=" Type next number= ? No punched cards on HP. The input and reply was getting printed on the paper console. Very primitive. But it was an interactive online program! It communicated with the user. It assumed 0 or no input as the sign to end the process. [One of my friends here just tells me that he ran this on an NT machine in DOS mode with a GW-BASIC just downloaded from the net; so it works even today! ] CICS, IDMS-DC, Unix, Client-Server, Web, JavaSince then we have come a long way. IBM went online with CICS in the eraly eighties. VM/370 appeared on the scene with tremendous interactive power for the developers, at the same time running either OS/VS1 or DOS/VSE under VM. IDMS-DC made its debut around 1983. Then there was of course, PDP/11 and VAX-11 machines from DEC, already out in the market. Unix and Client-Server captured the scene in the 90s. Web and Java completed the cycle in the late 90s. But online (interactive) programming has not changed at all! Basically the principle is the same: the programs prompts the user (text, map, form...) and the user replies, the program reads and responds again. There is no magic! User interface has changed, not the principle behind it (except in sales presentations and executive briefs!). CICS - Customer Information Control SystemCICS was one of the first systems to support online on 370. Typical CICS program was written in COBOL or PL/1. Databases from IBM were DL/1 or VSAM Files typically on DOS/VSE. CICS also supported IDMS-DB. A typicall CICS program starts by sending a map. EXEC CICS
SEND MAP ('D123MAP1') MAPSET('D123MAP') EXEC CICS
RETURN This is the start of a pseudo converse. Once the user enters something on the map and press ENTER (or any other PF key) the program (in fact the TASK) is activated again. The interesting code in the program in this case will be EXEC CICS
RECEIVE MAP ('D123MAP1') MAPSET('D123MAP') Then there is checking for the key by testing CICS variables DFHENTER, DFHPF1 .. etc. Database access takes place and the values are moved to the map and redisplayed to the user again. The process continues... In the simplest case a single program can be associated with a MAP and Task code. On the other hand real online systems involve many programs and maps. A program can call more than one map and even give control to other programs on the way or even start other TASKs related or unrelated to the current application. The bottom line is that you have a map (=Form) and some program code to manipulate the map fields and interact with the user. IDMSDC and ADS/OnLineIDMS/DC supported COBOL/DC and PL/1-DC programs just the same way as CICS. The interaction with the screen was achieved by MAPIN and MAPOUT commands. ADS/Online was a major step forward in the deveopment of 3270 based online systems. Unlike CICS/COBOL one was able to develop online applications without resorting to JCL and TSO jobs. IDD/ADSO was a good combination which resulted in very many online applications in production in the 80s and early 90s. Many of these are still alive and running very well. The only reason clients want to migrate is that they want graphical front-ends from PC and WWW. Hello World in Java /html
The above in a simple Java. In a real case there will be input and output to be processed by the server side Java Code. Basically the methodology of online processing has not changed very much from the days of the BASIC programming! Instead of interactive line by line I/O now we have forms and program code to process those forms. The program code is wrapped in html, Javascript, php, cgi code or/and java classes and beans and all sorts of new buzzwords! |
0302 Error Code Revisited0302 FIND/OBTAIN DBKEY The db-key specified is inconsistent with the area in which the specified record is stored. Probable causes forthe return of this status code are: ° The db-key has not been initialized properly. ° The record name is incorrect. ° The program has invoked the wrong subschema. If the FIND/OBTAIN DBKEY does not specify a record name, the return of this status code means that the db-key specified is not within the range of the DMCL tables. This error can be easily simulated by the following code (= case 1 above) MOVE 1234 TO DB-KEY1. Dialog will abend with the message IDMS DC173008 V7 APPLICATION ABORTED. BAD IDMS STATUS RETURNED; STATUS=0302 |
It was "user-friendly" until now (also for a long time)! Not anymore. Today browser and WWW decide everything. So you see new terms like "Click on this "browser friendly" sized image for full-size original: 894KB". On the other hand, several 'broser-friendly'pages mot printer-friendly. Nice looking page appears chopped off on the right when printed. On the other hand if you don't to waste paper and prefer to save the page locally, all you get is the frame-names, in case the page is built using frames!!
That's right. The following message came from Word when I tried to cut and paste an unprintable page from the browser. All other windows were working alright. In fact, I was able to start a PaintShop Pro and capture this image after I got the error. But the Word just won't allow the 'paste'!
When Sun Microsystems introduced Java as a programming language, it was marketed as something 'born for the web' and easier than C++. This is true. The language itself is simple and syntax rules are straightforward and simple indeeed. So anyone using Sun's free JDK Workbench (character based tool under DOS prompt) could write a few standalone Java programs or Web based applets. But soon it became obvious that Java's real power comes form programming using 'classes' (object orinted approach) rather than starightforward procedure oriented approach. Graphical Tools appeared in the market. Simple Java was not enough. Buzzwords like AWT, Swing and Beans appared.
Recently Sun acquired NetBeans IDE and Forte Tools and comibined the two to launch Forte for Java. In short Sun's own develpment now supports graphical tools for Java and is ready to compete against Visual Age, Visual Studio etc etc.
While installing Forte Community Edition (free) I got a message that one must have JDK1.3.1. So I installed JDK1.3.1 and tried Forte again. But still the old warning comes. Forte Install program does not accept that I have JDK1.3.1!! What is the basis? It seems Forte is simply looking at the directory name for JDK - if it doesn't match Sun's default (JDK131 or so) it assumes you do not have JDK1.3.1!!
This simple error, though ignored by many, is not simple at all. It gives you an idea of the philosophy and approach taken by Java programs and programmers. A serious decision has been taken based on what appears to be a misleading premise. This reminds me of one I know who missed an international flight at an airport, because asa regular traveler on this flight, he was expecting this flight to take off from a particular terminal. He waited and monitored the terminal from the nearby bar, while the plane took off from another terminal!
Buzzwords you should know!If you think your 20+ experience in developing and implementing production applications on IBM mainframe will guarantee you a job, you are in for a big surprise. A person with 6 months experience on Java (that too from a Sam's Learn in 21 days Book!) will carry more weight than you in any company anywhere in the world, unless you too pick up some of the modern buzzwords. We had already talked about Java and XML. There is one more important one now - UML which stands for Unified Modeling Language. UML - Unified Modeling LanguageThe books says "The Unified Modeling Language (UML) provides system architects working on object analysis and design with one consistent language for specifying, visualizing, constructing, and documenting the artifacts of software systems, as well as for business modeling.... UML is the proper successor to the object modeling languages of three previouslyleading object-oriented methods (Booch, OMT, and OOSE). The UML is the union of these modeling languages and more, since it includes additional expressiveness to handle modelingproblems that these methods did not fully address. " Basically it is modeling language for Object Oriented Design and Programming. Since Object Oriented Enthusiasts claim that everything in real life can be represented as objects, it goes without saying that UML can then represent every phenomena under the Sun. This is not so (surprisngly): UML does not support data-flow diagrams! Reason ? The Manual says: "Simply put, data-flow and other diagram types that were not included in the UML do not fit as cleanly into a consistent object-oriented paradigm. Activity diagrams and collaboration diagrams accomplish much of what people want from DFDs. " This is a contradictory statement. It is more like cutting your feet to fit the shoe instead of finding a proper shoe. Here is a sample (and simplest) diagram from UML. This notation is exactly opposite of what we have seen in E-R Modeling and even our own Bachman Diagram. An upside down representation gives an idea of shape of things to come in UML. |
The original article appeared in IDMS/SQL Issue 10.1 | Misuse of Words - A sequelIDMS/SQL News 10.1 carried a dispatch on "Misuse of Acronyms". There it was (rightly) mentioned that XML stands for Extensible Markup Language. But look at what IBM Manual on Visual Age says : Creating test cases for Extended Markup Language (XML) applications by hand from Document Type Descriptions (DTDs) can be tedious. [Visual Age for Java 4.0 Getting Started]. Extensible has become Extended!! Document Type Definition has been erroneously called Document Type Description! The books on Java and new technologies contains hundreds of such 'newly' invented acronyms loosely used to denote whatever the author had in his mind! |
This issue located at http://www.geocities.com/idmssql/idms102.htm
IDMS/SQL is published quarterly on behalf of IDMS WatchDog Group, Scandinavia, Oslo-Helsinki-Hørsholm for free circulation among IDMS Users Worldwide. IDMS/SQL News is not a CA publication. CA-IDMS/DB, CA-IDMS/DC and CA-ADS are registered trademarks of Computer Associates International Inc. CICS, IMS- DB/DC, VSAM and DB2 are registered trademarks of International Business Machines Corporation. Technical examples are only guidelines and modifications might be required in certain situations and operating systems. Opinion expressed are those of the authors and do not represent the views of IDMS clients or related vendors. Permission is hereby granted to use or reproduce the information , only to IDMS Customers and Consultants, provided the material is distributed free of charge.