| IDMS/SQL News 9.3
Vol 9.3 Technical Information for CA-IDMSâ Users Dec 2000
As you all know, IDMS/SQL News tried to support and promote the usage of SQL within IDMS for the last 9 years. Though we did have some success, by and large the IDMS Community did not resort to SQL usage. The main reason for this failure was the lack of positioning and support from the vendor. The product itself was good to start with, but very little happened in the last 5-8 years or so! IDMS Customers though proud of their existing systems, are beginning to wind up the product finally. This is not because they were unhappy with the applications or systems, but again proper guidelines to go forward were missing! The fate of the product at many sites is not decided by the technical strength, but by industry and market factors. Though there had been spectacular failures in conversion from IDMS to other products on mainframe as well as UNIX databases, though there have been recent failures even in Web/Dot.com corner, though mainframe has made a tremendous comeback and is here to stay, the vendor and the product failed to capitalize on these stories.
IDMS/SQL News will continue to be published, but the frequency will be reduced to just 3 issues an year. Also we will devote less and less for IDMS and more for the new technologies!
0966 Error Code revisited
One can get 0966 error code typically in a local mode batch program when you try to ready the area in update mode and the area is already in update mode in CV. 0966 only means that area is not available to you. The manual says :
0966 READY: The area specified is not available in the requested usage mode. If the
This means that you can get this error code even in CV. If the area is not available in CV (either in RET or OFL) then one can get 0966 for CV jobs, ADS dialogs and OLQ. We reproduce the error in OLQ as follows:
1. First make the area offline
DCMT V SEGMENT EMPDEMO OFL
3. GET FIRST SEQ DEPARTMENT
1201 vs 1221 Error Code
The issue was simple. A record was being updated with a STORE command. The area in which the record resides has been READied in update mode.
But at run time the Batch COBOL gave an error 1201.
Minor Code 01 means "An area has not been readied, or an IF operation has determined that
the set is
The problem came because there was a system-owned index for the record which was in its own area. You need to READY the index area too in UPDATE Mode. This is very often overlooked by newcomers, because in the test EMPLOYEE database the indexes are normally stored in the data area itself and this problem is not encountered in the education and training.
But why did COBOL and ADS give two different minor codes?
CONNECT TO and Related SQL Errors
1. Wrong DBNAME
SELECT NAME FROM SYSTEM.SCHEMA
Commit - Implicit, Explicit and triggered
Effect of teleprocessing statements
Effect of CA-ADS application termination: The termination of a
CA-ADSapplication causes a ROLLBACK RELEASE to be issued on all SQL sessions.
If A002 does not issue SQL COMMIT, the transaction will be rolled back in IDMS:
FINISH TASK from a OSLQA002 pgm does commit SQL transaction.
MOD PROCESS NAME IS PSQL023-RP1 VERSION IS 1 PUBLIC ACCESS IS ALLOWED FOR ALL MODULE SOURCE FOLLOWS € MOVE 2 TO WL-DEPTID. LINK PROGRAM 'PSQLA002' USING (WS-LINK). € € ROLLBACK TASK. € THE ABOVE WILL ROLLBACK THE SQL OF THE CALLED COBOL PGM € COMMIT TASK.IS ALSO IMPLICIT COMMIT IS DONE ON DISPLAY € DISPLAY TEXT 'LINK AND BACK FROM A NO FINISH COBOL PGM'. MSEND . PSQLA002 COBOL source *DMLIST *DMLIST IDENTIFICATION DIVISION. PROGRAM-ID. PSQLA002. AUTHOR. IDMSSQL *_______________________________________________________________ *! ! *! : SQL test program ! * *!_____________________________________________________________! ****************************************************************** ENVIRONMENT DIVISION. CONFIGURATION SECTION. SOURCE-COMPUTER. S/390. OBJECT-COMPUTER. S/390.
IDMS-CONTROL SECTION. PROTOCOL. MODE IS IDMS-DC. DATA DIVISION. FILE SECTION. WORKING-STORAGE SECTION. COPY IDMS SUBSCHEMA-CTRL. EXEC SQL BEGIN DECLARE SECTION END-EXEC * THE FOLLOWING IS REQUIRED ONLY IF SEPARATE SESSIONS * ARE NEEDED IN THE CALLED PROGRAMS 01 IDMS-SESS-ID USAGE SQLSESS. 01 WS-DBNAME PIC X(8). 01 WS-DEPT. 02 WS-DEPTID PIC 9(4). 02 WS-DEPTNAME PIC X(45). 02 WS-DEPTHEAD PIC 9(4). EXEC SQL END DECLARE SECTION END-EXEC. 01 ARBEIDSFELTER. 02 J1 PIC S9(4) COMP. 01 WS-SQLDBUG. 02 ERROR1 PIC X(8) VALUE '*ERROR*'. 02 WS-SQLCODE PIC 9(8) VALUE 0. 02 WS-SQLSTATE PIC X(5) VALUE SPACE. 02 FILLER PIC X(50) VALUE SPACE. 02 WS-DBUG-END PIC X VALUE SPACE. ***************************************************************** LINKAGE SECTION. EXEC SQL BEGIN DECLARE SECTION END-EXEC 01 WS-LINK. 02 WL-DEPTID PIC 9(4). EXEC SQL END DECLARE SECTION END-EXEC. PROCEDURE DIVISION USING WS-LINK . A-MAIN SECTION. **************** A-START. MOVE 'SQLDICT1' TO WS-DBNAME. EXEC SQL CONNECT TO :WS-DBNAME END-EXEC. IF SQLSTATE NOT = '00000' MOVE SQLSTATE TO WS-SQLSTATE MOVE SQLCODE TO WS-SQLCODE WRITE LINE TERMINAL NOWAIT NEWPAGE FROM WS-SQLDBUG TO WS-DBUG-END END-IF EXEC SQL UPDATE IDMSSQL.DEPT_V SET DEPTNAME='UPDATE PSQLA002' WHERE DEPTID=:WL-DEPTID END-EXEC. * FINISH TASK * EXEC SQL * COMMIT RELEASE * END-EXEC. . A-EXIT. GOBACK. COPY IDMS IDMS-STATUS. IDMS-ABORT SECTION. EXIT.
CALC Key Length?
What is the maximum length of a CALC Key. Yes, it is given in the manual - 256 bytes. But can you prove it using the IDMS terminal alone. Here we go:
Create a table in OCF(ISQL) with a column with length of 257 bytes. Try creating CALC on that column.
CREATE TABLE IDMSSQL.CALC1
CREATE TABLE IDMSSQL.CALC1
Since the CALC algorithm used is the same for SQL or non-SQL the findings are valid for non-SQL databases as well.
Element name and Element Synonym
Note that one can display by ELEMENT name as well as ELEMENT SYNONYM. In simple cases these will be same. But if you are using record synonyms the results may be different!
What happens when a dialog load module is deleted while in use?
If you go to IDD and delete a dialog load module while someone is in psudo-converse with the same dialog, you get the following message (upon wakeup from pseduo-converse)
PREVIOUS TASK ABENDED WITH ABEND CODE D002 AND MESSAGE CODE 021007
BACKSCAN=YES - Beware !
Mapping Manuals says:
BACKSCAN YES/NO Indicates whether trailing blanks are to be eliminated from the field prior to display:
° YES specifies that the contents of the field are displayed without trailing blanks (if any). Old data may remain in the field after operator alterations if NEWPAGE is set to NO in either the ADS/OnLine sysgen statement or the DML statement that issues the mapout.
° NO (default) specifies that the contents of the field are displayed with trailing blanks (if any).
Well, normally everything works OK. There are some combination of field editing features which might end up in confusing results.
Here is a situation where the user has a numeric field, and the data old remains there though the process is moving zeros to the field.
Map Read/Write Options Page 2 of 7 Map name: S657A100 Version: 1 Element name BACKEND-NR Subscript
In record WM657A100-2 Version 1
Map Read Transmit data entry (/) . . . . . . . . / options Zero when null (/). . . . . . . . . . . / Translate to upper case (/) . . . . . . _ Justify data. . . . . . . . . . . . . . 2 1. Left 2. Right Pad character format . Display . . . . 0 Hexadecimal . . F0
Map Write Blank when zero (/) . . . . . . . . . . /
options Underscore blank fields (/) . . . . . . _
Display without trailing blanks . . . . / Set modified data tag (/) . . . . . . . _ Transmit. . . . . . 1 1. Data and attribute byte 3. Erase field 2. Attribute byte only 4. Nothing DC366404 Select input/output edit options
1.1 S657A100 v 1
Batch Decompile gives :
1.2S657A100 Version 2 Here we get the correct BACKSCAN=NO
OF WM657A100-2 VER 1
HELP SOURCE NONE
REVERSE NUMERIC IS NO
EXTERNAL PICTURE IS 'Z(11)9'
ZEROED WHEN NULL
BLANK WHEN ZERO
Attached Task and ADS Dialog
The following DC COBOL code will attach a task within IDMSDC.
MOVE 'D100' TO WL-TASK-CODE.
The invoked task can be anything including a mainline ADS/OnLine dialog, ADSA Task, COBOL or Assembler Program.
If it is an ADS Dialog the dialog must be defined as a task invoking ADSORUN1.
DCMT V DYN TASK D100 INV *.ADSORUN1 NOINP .
But sometimes you still don't get the attach working! In the log you may see a message like
DC171028 APPLICATION NOT EXECUTED. DIALOG LOAD MODULE D100 MISSING
If the automatic debugging of ADS Tools (ex DBMS Tools) are active, you may see another message
DC466014 V7 Abort occurred in dialog D100 process version 0000
But you execute the dialog from your terminal, it works! Where is the mystery?
The problem is that in order to get the ATTACH working, the attached dialog must be available in the DEFAULT dictionary, and not in the secondary dictionary. Attached tasks runs in the background as a non-terminal task and there is no way to start a background task from a secondary dictionary! You can punch the dialog load module and linkedit it into the load library. This is a wayout for dialogs lying in seondary dictionary.
In generic terms, a servlet is any class that can be invoked and executed on a server, most likely on behalf of a client. Unlike applets, which do their work on the client, servlets do their work on the server and are often used to replace Common Gateway Interface (CGI) or other server-side programming models. Another way of phrasing what servlets do is "server-side Java." Since servlets are written in Java and are part of the J2EE specification, they have access to all the functionality and cross-platform portability of the Java programming language.
An HTTP servlet is a Java class that handles an HTTP request and delivers an HTTP response. HTTP servlets live in an HTTP server and must extend the javax.servlet.http.HttpServlet class, so that they can run in a generic servlet engine framework.
JavaServer Pages (JSP) is a JavaSoft specification for combining Java with HTML to provide dynamic content in web pages. JSPs are more convenient to write than HTTP Servlets because they allow you to embed Java code directly into your HTML pages, in contrast with HTTP servlets where you embed HTML inside of Java code. JSP is part of the Java Two Enterprise Edition (J2EE).
JSP allows you to separate the dynamic content of a Web page from its presentation. It caters to two different types of developers: HTML developers, who are responsible for the graphical design of the page, and Java developers, who handle the development of software to create the dynamic content. Although similar to WebLogic JHTML, a proprietary WebLogic API, JSP facilitates development of dynamic Web pages through the use of higher level control tags and JavaBeans.
Small Thing matters!: Arianne-5 and Ada Compiler- Revisited
On 4 June 1996, the maiden flight of the Ariane 5 launcher ended in a failure. Only about 40 seconds after initiation of the flight sequence, at an altitude of about 3700 m, the launcher veered off its flight path, broke up and exploded. IDMS/SQL News 5.3 (Aug 96) had carried the news about Arianne-5 rocket failure. We had commented that it was due to software error which sent wrong signals to the rocket such that it took wrong course. Here we take second look at this disaster.
COMMENTS ON THE FAILURE SCENARIO
In the failure scenario, the primary technical causes are the Operand Error when converting the horizontal bias variable BH, and the lack of protection of this conversion which caused the SRI computer to stop.
It has been stated to the Board that not all the conversions were protected because a maximum workload target of 80% had been set for the SRI computer. To determine the vulnerability of unprotected code, an analysis was performed on every operation which could give rise to an exception, including an Operand Error. In particular, the conversion of floating point values to integers was analysed and operations involving seven variables were at risk of leading to an Operand Error. This led to protection being added to four of the variables, evidence of which appears in the Ada code. However, three of the variables were left unprotected. No reference to justification of this decision was found directly in the source code. Given the large amount of documentation associated with any industrial application, the assumption, although agreed, was essentially obscured, though not deliberately, from any external review.
More of this at http://www.esa.int/htdocs/tidc/Press/Press96/ariane5rep.html
Re-usable Component Error?
Today everyone is talking about re-usable component architecture. One example is the Javabeans in the Java world. But it will be interesrting to note that Arianne-5 disaster was caused by a reusable component error!
It is a reuse error. The SRI horizontal bias module was reused from a 10-year-old software, the software from Ariane 4.
But this is not the full story:
It turns out that an integer overflow raised an (Ada) exception which halted the machine (which was the specified behaviour). In addition, the differences in object code between the tested and operational systems raise the issue of errors in the object code for the operational system. Such errors are most likely to occur due to an error in the compilation environment, although it is possible that other factors, such as human error (e.g. specifying the wrong version of a file when the code is recompiled) can be involved. For example, there are documented cases where Ada compilers generate the correct code when exceptions are not suppressed, but generate incorrect code (beyond the language's definition of "erroneous") when they are suppressed.
Today Java is introducing re-usable code in the form of JavaBeans. But read this:
It is regrettable that this lesson has not been heeded by such recent designs of Java (which added insult to injury by removing the modest assert instruction of C!), IDL (the Interface Definition Language of CORBA, which is intended to foster large-scale reuse across networks, but fails to provide any semantic specification mechanism), Ada 95 and ActiveX.
For reuse to be effective, Design by Contract is a requirement. Without a precise specification attached to each reusable component -- precondition, postcondition, invariant -- no one can trust a supposedly reusable component.
Just One more! What Units are you talking about?
On July 23, 1983 Flight 143 from Montreal to Ottawa, and on to Edmonton which was using one of the newest Boeing 767, ran out of fuel in mid-air and glided and crash-landed on an unused air-strip at Gimli, Manitoba near Winnipeg. The problem arose because of the miscalculation of the needed fuel, an error caused by mixing metric and imperial units (kg vs pounds). Luckily the pilot was an gliding expert who managed to save all on board and the plane. As an added coincidence the Air Canada mechanics driving a van to Gimli to begin repairs ran out of gas in the backroads of Manitoba!
IDMS/SQL is published on behalf of IDMS WatchDog Group, Helsinki-Hørsholm-Oslo 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 and DB2 are registered trademarks of IBM Corporation. Technical examples are only guidelines and modification 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.