Saturday, December 26, 2015

IoT(Internet of Things) in HP Nonstop

IoT starts rolling out companies, will require both data-in-motion and data-at-rest processing to have a complete IoT solution.

HAVEn does an excellent job for 'data at rest'.

NonStop with some additional players will be a great fit for 'data in motion'.

Now just as NoSQL (which stands for Not only SQL) which are new methods and databases for enhancing and supplementing SQL databases, I believe NonStop in this data in motion space can supplement HAVEn. So with NonStop we have 'not only' HAVEn but NonStop and HAVEn truly better together.


Wednesday, December 16, 2015

COBOL Programming - Tip

Tip #1 

In a Tandem COBOL program, always use ENTER "COBOL_COMPLETION_" USING 1 
to abend a program. 

This preserves the call stack in the ZZSAnnnn saveabend file.

Tip#2

When you process information within a field with a known structure don’t use Reference Modification.


Make a REDEFINES of the field using self-explaining named fields, just to be sure that during maintenance not all the references should be changed.

Tip #3

Do not use the LINKAGE SECTION as working area. 

Tip#4

Use  ?SOURCE standard .
The exception is the use of the replacing option, then  “COPY” must be used. Explanation:
-          ?SOURCE is needed for SQL pre-compile options
-          COPY knows the replacing option ?SOURCE doesn’t.
-          COPY knows default library’s when you use ?SOURCE you should always give the needed library.
?SOURCE could contain library text (source directive could be nested, eq SQL statements) COPY can’t handle this

Thursday, December 10, 2015

HP Nonstop COBOL and Z/OS COBOL difference

I have written a White paper on HP Nonstop COBOL and Z/OS COBOL difference. Here's the link for that.

http://www.cognizant.com/InsightsWhitepapers/A-Checklist-for-Migrating-Big-Iron-Cobol-Applications.pdf


Wednesday, December 09, 2015

SQLMP Programming TIP

In the SQLMP programming, dont use the SQL Statements like

 - BEGIN WORK
 - COMMIT WORK
 - ROLLBACK WORK

Instead , pls use the equalent TAL statements
      START TRANSACTION
      ABORT TRANSACTION and
      END TRANSACTION.

The reason is, SQL Statements like COMMIT WORK , also performs FREE RESOURCES which will results in closing cursors.

NSSQL Tip #5 - Insert into a relative table

By default insertion in a Relative tabel is done at the end of the table. If there is no room left at the end of the table,  a “table-full” message is issued.

To avoid this, the ANYWHERE-option of the insert-statement must be used. With this option rows can be inserted in any available area.

Alternatively it is possible to assign a value to the SYSKEY. In that case the ANYWHERE option is not needed.

Tandem SQLMP and Z/OS DB2 Difference

I have written a white paper on the difference between SQLMP and DB2 sometime back. Here's the URL for that.

http://www.cognizant.com/insightswhitepapers/Dynamics-of-Leading-Legacy-Databases.pdf

Tuesday, December 08, 2015

COBOL Pathway Server Class - TIP

A server may only perform a "STOP RUN" statement, when an EOF is received on $RECEIVE.

The Pathway monitor is not aware of a stop of the server-process and when it grants another request for that particullar server-process, the requester gets an error which results in unnecessary cpu-resources.

Screen COBOL - Tip

Overlay screens may have a maximum depth of 3.  (This is base screen/overlay/overlay)

If a screen is defined with many overlays, the memory resources of the TCP program fill up and result in memory swapping to disk.

Influence the Query Plans

When to Influence the Optimizer

• Poor Plan selected by the optimizer results in poor execution time
• Provide a workaround when query results in a compile time error
• Compilation takes a long time: Limit the search space to get better compile time
• In embedded static SQL applications values of host variables used in predicates are not known
at compile time, example
− WHERE T.col1 = :hv
− WHERE T.col1 BETWEEN :hv1 AND :hv2












Influencing the Optimizer —

Query Transformation
• Query formulations sometimes can be tuned to help optimizer
    −Example: prefer use of joins instead of subqueries;
      while SQL/MX converts many subqueries into joins there are some correlated ones that it cannot
• Specify all applicable predicates for positioning and joins
• When using multi-valued predicates (row constructors) with clustering key columns force
MDAM to avoid scans.

Best Practices
• Give optimizer as much information as possible
      − Efficient predicates
      − Consider window predicates
• Use CQDs for optimizer hints
       − HIST_DEFAULT_SEL_FOR_PRED_RANGE
       − INTERACTIVE_ACCESS
• Some CQDs may be set globally in SYSTEM_DEFAULTS table
• Use CQS as last resort
− Only force basic outline of a plan and let optimizer find the optimal solution within the boundaries imposed by the command