Wednesday, November 04, 2015
Tuesday, November 03, 2015
NQSQL TIPS
|
||||||
|
||||||
Monday, November 02, 2015
Unicode - UTF 8, 16 and 32 Details
UTF8is variable 1 to 4 bytes.UTF16is variable 2 or 4 bytes.UTF32is fixed 4 bytes.
In brief, UTF32 uses 32-bit values for each character. That allows them to use a fixed-width code for every character.
UTF16 uses 16-bit by default, but that only gives you 65k possible characters, which is nowhere near enough for the full Unicode set. So some characters use pairs of 16-bit values.
And UTF8 uses 8-bit values by default, which means that the 127 first values are fixed-width single-byte characters. (the most significant bit is used to signify that this is the start of a multi-byte sequence, leaving 7 bits for the actual character value) All other characters are encoded as sequences of up to 4 bytes (if memory serves).
Unicode is a standard and about UTF-x you can think as a technical implementation for some practical purposes:
- UTF-8 - "size optimized": best suited for Latin character based data (or ASCII), it takes only 1 byte per character but the size grows accordingly symbol variety (and in worst case could grow up to 6 bytes per character)
- UTF-16 - "balance": it takes minimum 2 bytes per character which is enough for existing set of the mainstream languages with having fixed size on it to ease character handling (but size is still variable and can grow up to 4 bytes per character)
- UTF-32 - "performance": allows using of simple algorithms as result of fixed size characters (4 bytes) but with memory disadvantage
Friday, October 30, 2015
What is INSPECT?
Inspect
is an interactive symbolic debugger that enables you to isolate program bugs
quickly.
Few
High-Level Inspect Commands which are specific to 100 coded object files are in
detail below.
IDENTIFIER
Displays information about the internal characteristics of a given data location or of all data locations in one or more scope units. The IDENTIFIER command is a synonym for the INFO IDENTIFIER command.
Displays information about the internal characteristics of a given data location or of all data locations in one or more scope units. The IDENTIFIER command is a synonym for the INFO IDENTIFIER command.
INFO IDENTIFIER
The INFO IDENTIFIER command displays information about the internal characteristics of a given data location or of all data locations in one or more scope units, including native symbols.
The INFO IDENTIFIER command displays information about the internal characteristics of a given data location or of all data locations in one or more scope units, including native symbols.
Usage Considerations
- The INFO IDENTIFIER command can be used for active and
for inactive scope units in processes, PATHWAY servers, and save files. In
a PATHWAY requester program, the INFO IDENTIFIER command can be used only
for active scope units.
- Types of Entities - The form of the output produced by
INFO IDENTIFIER for a given identifier depends on the type of entity the
identifier denotes.
- INFO IDENTIFIER Presentation for Variables - A typical
program contains more identifiers for variables than for any other entity
class.
MATCH
The MATCH command searches for scope-unit names or other identifiers in the current program.
The MATCH command searches for scope-unit names or other identifiers in the current program.
Default Values
- If the MATCH IDENTIFIER command is entered with only
one pattern, Inspect will display only the matching symbols, and the
scopes they were found in.
- If the VERBOSE clause is omitted, scope names are
displayed only if they have a matching pattern.
Usage Considerations
- Matching Uppercase and Lowercase Letters - The MATCH
command does not distinguish between uppercase and lowercase letters in
the pattern unless the current language is C.
- Alias Restrictions with the MATCH command - Aliases are
not be expanded in the pattern with the MATCH IDENTIFIER or the MATCH
SCOPE commands.
- Matching Scopes With a Leading “#” - You must include a
“#” to match scopes which have a leading “#”. For example, to match the
scope, “#global”, enter: MATCH SCOPE ##global
Thursday, October 15, 2015
Saturday, October 10, 2015
Different Object File and Native Processor Types
| Object File Code | Object Type | Native Processor Types |
|---|---|---|
| 100 | TNS | CISC (Complete Instruction Set Computing) for the Tandem Processor. - TNS objects (COBOL, TAL, etc) will be interpreted on Integrity Platforms |
| 700 | TNS/R | RISC(Reduced Instruction Set Computing) for the MIPS Processor - TNS/R Native object files cannot be executed on a TNS/E Platform. All TNS/R Native Programs must be recompiled using a TNS/E Native Compiler(for Native 800 Object) OR the TNS Compiler(for interpreted 100 Object) |
| 800 | TNS/E | EPIC(Explicitly Parallel Instruction Computing) for the Intel Itanium Processor - TNS/E Native Object Files cannot be executed on a TNS/R Platform. - OSS Programs must be migrated to TNS/E Platform - All TNS/E Native Code is position independent code (PIC) |
Corporates today depend on HP Integrity NonStop mission-critical servers
Modern HP Integrity NonStop Servers continue to deliver on hallmark attributes -
- Availability,
- Scalability and
- Data Integrity
The HP NonStop Server continues to be the industry leader in mission-critical availability and reliability, with an extensive footprint in financial services and telecommunications marketplaces, and the customers who deploy NonStop have been spared the ignominy that can come with unwanted media coverage.
Few recent wins.
- In America, PULSE selects four NB54000c for Credit Scoring
- In India, Mobile phone operator depends on 300 NonStop processors
- In Norway, Healthcare is operating with NonStop
- In Singapore, Shippers move containers NonStop
- In Germany, auto manufacturer never unseated
- Availability,
- Scalability and
- Data Integrity
The HP NonStop Server continues to be the industry leader in mission-critical availability and reliability, with an extensive footprint in financial services and telecommunications marketplaces, and the customers who deploy NonStop have been spared the ignominy that can come with unwanted media coverage.
Few recent wins.
- In America, PULSE selects four NB54000c for Credit Scoring
- In India, Mobile phone operator depends on 300 NonStop processors
- In Norway, Healthcare is operating with NonStop
- In Singapore, Shippers move containers NonStop
- In Germany, auto manufacturer never unseated
For Migration from COBOL to Java - POC Details
HP and Blu Age® completed a multi-step migration and modernization Proof of Concept (POC) project that took a legacy OLTP application from COBOL and DB2 on an IBM mainframe,
- First to Java and DB2 on the HP ProLiant DL360 platform, &
- Ultimately to Java and SQL/MX on an HP NonStop Server.
The project included comparisons of transaction execution times in the
- ProLiant environment,
- a hybrid NonStop and
- Windows environment, and
- a “pure NonStop” environment.
The NonStop Server was clearly the overall winner for the set of transactions comprising this POC.
The Blu Age1 software suite implements
- Model Driven Architecture (MDA) principles &
- Offers appropriate methods to deliver Service Oriented Architecture (SOA) application programs written in Java.
The Reverse Modeling component facilitates the extraction of business logic from the legacy code and constructs UML (Unified Modeling Language) models that can be used to generate the application in a Java framework.
The Blu Age software is packaged as a plugin for Eclipse, an open source IDE (integrated development environment) frequently used to develop Java applications.
POC configuration
Configuring the hardware and software for this POC required no extraordinary efforts.
Standard 1 GB Ethernet connections were used to connect these hardware components used for testing:
• NonStop Server: NS16004, with 10 mirrored data drives, running H06.25, SQL/MX 3.2, and NonStop Java 6.0 (1.6).
• Windows server (for Java middle layer): HP ProLiant DL360 G5, running Windows Server 2008, Java 1.6 and Blu Age 3.7.
The middleware setup required installing JBoss 7.1.1 and its dependencies.
A few minor (and common) DDL adjustments were made when the NonStop SQL/MX tables were created:
- VARCHAR columns with lengths less than 20 were changed to fixed CHAR columns of the same length. (This is a typical optimization practice for NonStop SQL.)
- BIGINT columns were changed to the equivalent NonStop SQL/MX data type, LARGEINT.
- Columns declared with DEFAULT NOT NULL syntax were given a default value of 0.
Thursday, October 08, 2015
Availablity , Statistics and Performance (ASAP)
ASAP Monitors hundreds of Objects in Real-Time.
It Provides goals and actions to repair or restart system and Application Components.
ASAP has a wide range of visual and programmatic interfaces,
- Including EMS,
- Conversational interface,
- Fat and thin client interfaces,
- Provider/Consumer APIs
- Email
- Phone Notifications with color-coded HTML reports
- Customizable GUIs with user-defined Dashboards and
Long term Historical Database with up to eve 10 years worth History of all Availablity,
statistics and performance data.
ASAP Can integrate with HP operations manager.
ASAPX in an API into the ASAP infrastructure to monitor the availablity and performance ob abstract application domains.
ASAP Hybrid plug-in for Linux integrates Linux Application metrics into ASAP, providing a visa of the entire application spanning across Nonstop and Linux systems.
It Provides goals and actions to repair or restart system and Application Components.
ASAP has a wide range of visual and programmatic interfaces,
- Including EMS,
- Conversational interface,
- Fat and thin client interfaces,
- Provider/Consumer APIs
- Phone Notifications with color-coded HTML reports
- Customizable GUIs with user-defined Dashboards and
Long term Historical Database with up to eve 10 years worth History of all Availablity,
statistics and performance data.
ASAP Can integrate with HP operations manager.
ASAPX in an API into the ASAP infrastructure to monitor the availablity and performance ob abstract application domains.
ASAP Hybrid plug-in for Linux integrates Linux Application metrics into ASAP, providing a visa of the entire application spanning across Nonstop and Linux systems.
Tuesday, October 06, 2015
Checklist - To migrate into OSS - VI - And Thats it :)
After System and Database updates, Next step would be Application Installation.
| ID | Task Description | Prior Task |
Resource | Remarks |
|---|---|---|---|---|
| 24 | Place Application in Dir. Structure | 11,19 | Applications | Expand the Application Delivery Package and Place into the proper delivery structure. This often requires utilities like TAR,GZIP and/or Jar. |
| 25 | Configure Pathway and Serverclass | 24 | Applications | Configure Pathmon/Pathway Naming, Locations and server classes(including environment variables) - If needed |
| 26 | Deploy .war files for web interfaces | 25 | WebAdmin | Deploy distributed .war files |
| 27 | Configure Externalized properties for web interface(s) | 26 | WebAdmin | Modify Externalized properties for IP addresses, catalogs, schemas and user-id. |
| ID | Task Description | Prior Task |
Resource | Remarks |
|---|---|---|---|---|
| 28 | Configure Online Dumps | 21 | Database, Systems, Operations |
Use TMFCOM to configure online dump schedules for database protection |
| 29 | Configure Scheduled Backups | 27 | Database, Application, Operations, Systems |
Determine backup fileset, schedule and methods; Implement in batch scheduler.(Each OSS pathname has a corresponding Guardian Filename) |
| 30 | Identify Logs to Monitor | 27 | Database, Applications, Operations, Systems, Interface Group, WebAdmin |
Identify Logs to Monitored across the enterprise. Ported Applications will NOT typically use VHS or EMS. |
Monday, October 05, 2015
Checklist - To Migrate into OSS - V
When the System is READY, the next steps is for DBA Team to prepare and execute DDL Scripts and prepare database for use.
| ID | Task Description | Prior Task |
Resource | Remarks |
|---|---|---|---|---|
| 20 | Modify DB scripts for Disk Layout | 3 | Database | Edit SQL DDL Scripts to distribute the database. |
| 21 | Create the Application Schemas and Tables | 20.21 | Database | Obey the scripts in MXCI to create the Application schemas and Tables |
| 22 | Create MetaData (catalog) convenience views{optional} | 21 | Database | Download and run in OSS the mxschema utility to create views of database metadata tables |
| 23 | Create datasource for J/ODBC access | 18,21 | Database | Use mxcs or NSM/Web to create a data source. |
Checklist - To Migrate into OSS - IV
| ID | Task Description | Prior Task |
Resource | Remarks |
|---|---|---|---|---|
| 16 | Create Resolver Links for TCP/IP | 15 | Systems | Edit, In Guardian Space, $system.ZTCPIPHOSTS & RESCONF, In OSS, create symbolic links for HOSTS, RESOLV.CONF, PROTOCOLS, NETWORK and SErvices in the /etc directory |
| 17 | Create Data service | 16 | Systems | Use SCF to add a Data Service |
| 18 | Add "DBA.manager" to MXCS | 17 | Systems | Use MXCS mode of MXCI to grant OPERATOR privileges to the dba.manager user. |
| 19 | Install any open source utilities | 18 | Systems | Identify the useful utilities and install those. Modify the /etc/profile and users .profile files. |
Checklist - To Migrate into OSS - III
| ID | Task Description | Prior Task |
Resource | Remarks |
|---|---|---|---|---|
| 11 | Create Application Directories | 10 | Systems | Establish OSS directory for Application like APPL, BIN etc |
| 12 | Install SQLMX | 11 | Systems | |
| 13 | Install Java | 12 | Systems | |
| 14 | Install Java-addons and other software required for Application | 13 | System | Following Components needed - J/ODBC drivers - JToolKit- Contains APIs - Javaservlets - Required for WebApps - HP Jmeter for Nonstop Java - Performance Anlayse Tool |
| 15 | Initialize JDBC | 14 | Systems |
Checklist - To Migrate into OSS - Part II
| ID | Task Description | Prior Task |
Resource | Remarks |
|---|---|---|---|---|
| 6 | Move QIO to KSEG2 (Required for Java) |
3 | Systems | Use SCF to move QIO to KSEG2. And Reboot. |
| 7 | Configure TMF | 6 | Systems | Use TMF to configure TMF components and Objects: Audit Trails, Dump and restore volumes etc |
| 8 | Create Mount Point Dir | 8 | Systems | Use OSS to establish mount point directory |
| 9 | Create Disk Pool | 9 | System | Create Disk pool Definition Files / Scripts |
| 10 | Start the Filesets | 10 | Systems | Use SCF to add and start a name server If needed. Then, add and start a fileset for the new mount point. |
Sunday, October 04, 2015
Tokenization : Creating Secure Test Data
PCI DSS Section 6.4.3 requires that "Production Data (live PANs) are NOT used for Testing or Development".
If we need a Huge Dataset of real looking PANs for a Test. How do we create those?
A good Tokenization will allow you to do "BATCH COPY" where you start with PAN Data and end up with Tokens.
Doing this in production once is a fast and secure way to create test data: when configured properly, the tokens can look like "REAL" PANs and can even pass Luhn check.
Thus creating a huge set of Test data which is NOT tied to real PAN data at all becomes easy exercise.
If we need a Huge Dataset of real looking PANs for a Test. How do we create those?
A good Tokenization will allow you to do "BATCH COPY" where you start with PAN Data and end up with Tokens.
Doing this in production once is a fast and secure way to create test data: when configured properly, the tokens can look like "REAL" PANs and can even pass Luhn check.
Thus creating a huge set of Test data which is NOT tied to real PAN data at all becomes easy exercise.
Challenges of being a Tandem DBA
- Repartition
- Reviewing and updating key values
- Merging Partitions
- Reuse Partitions
- Update statistics
- Gathering SQL/MX statistics
- Copy Statistics from One Table (or system) to Another
- Index maintenance
- Create
- Populate
- Drop
- Alter
- Specifying Access Previleges
- Grant
- Revoke
- Query Performance Tuning
- Building and Deploying Standard Queries
- Dataload/Unload
- Moving Data from MP to MX for Testing
Friday, September 18, 2015
NSSQL : Varchar columns
Varchar in COBOL
Invoke of a varchar in COBOL gives the following result:_
invoke testtab format cobol;
* Record Definition for table
* Definition current at 16:08:08 - 09/06/01
01 TESTTAB.
02 NAAM PIC X(4).
02 LANG.
03 LEN PIC S9(4) COMP.
03 VAL PIC X(255).__
Assigning a value to a VARCHAR column in COBOL
On insert, the length-field of the VARCHAR-columns must be specified by the program as well
as the value-field.
The length-field will be filled automatically when the TRIM-function is used._
Example:_
INSERT INTO =EMS-LG
(
. . .
, TXT
. . .
)
VALUES
(
. . .
, TRIM(:VAL OF TXT OF WS-EMS-LG)
. . .
) _
Note: when the source-string is nullable, an indicator-field has to be used as well._
Example_
TRIM(TRAILING " " FROM ( :VAL OF TGV-REK-NR OF table_
INDICATOR :INDICATOR OF TGV-REK-NR OF table))
Assigning a value to a VARCHAR column in SQLCI
If you want to assign a value to a varchar-column with a string that is longer than 80
characters using SQLCI, then use the following syntax:_
insert into =test-tabel values ("test",
"1234567890123456789012345678901234567890123456789012345678901234567
890" ||
"1234567890123456789012345678901234567890123456789012345678901234567
890" ||
"1234567890123456789012345678901234567890123456789012345678901234567
890" ||
"123456789012345678901234567890123456789012345");_
--- 1 row(s) inserted._
Select in SQLCI
Selecting a varchar column in SQLCI only shows the first 80 characters._
select long from testtab;_
LONG
-------------------------------------------------------------------------------------------------_
123456789012345678901234567890123456789012345678901234567890123456789012345
67890_
--- 1 row(s) selected._
If you are interested in all characters, use the report writer command SET STYLE. Change the
style-option VARCHAR_WIDTH. Maximum is 255._
set varchar_width 255;
select langejan from testtab;_
LANGEJAN_
--------------------------------------------------------------------------------_
--------------------------------------------------------------------------------_
---------------_
123456789012345678901234567890123456789012345678901234567890123456789012345
67890
123456789012345678901234567890123456789012345678901234567890123456789012345
67890
123456789012345678901234567890123456789012345678901234567890123456789012345
67890
123456789012345_
--- 1 row(s) selected._
For columns even longer than 255 bytes the LIST_COUNT-option of the SQLCI-session can be
used:_
set list_count 1;_
select constrainttext from =constrnt
where tablename like upshift(“%BTCHFILE%”);_
detail constrainttext as C3000.75;_
list first; (or short: l f )
(also list next / list all can be used)_
**** next = enter_
**** to cancel the SELECT when not all result rows are shown
cancel;_
set list_count all;_
Invoke of a varchar in COBOL gives the following result:_
invoke testtab format cobol;
* Record Definition for table
* Definition current at 16:08:08 - 09/06/01
01 TESTTAB.
02 NAAM PIC X(4).
02 LANG.
03 LEN PIC S9(4) COMP.
03 VAL PIC X(255).__
Assigning a value to a VARCHAR column in COBOL
On insert, the length-field of the VARCHAR-columns must be specified by the program as well
as the value-field.
The length-field will be filled automatically when the TRIM-function is used._
Example:_
INSERT INTO =EMS-LG
(
. . .
, TXT
. . .
)
VALUES
(
. . .
, TRIM(:VAL OF TXT OF WS-EMS-LG)
. . .
) _
Note: when the source-string is nullable, an indicator-field has to be used as well._
Example_
TRIM(TRAILING " " FROM ( :VAL OF TGV-REK-NR OF table_
INDICATOR :INDICATOR OF TGV-REK-NR OF table))
Assigning a value to a VARCHAR column in SQLCI
If you want to assign a value to a varchar-column with a string that is longer than 80
characters using SQLCI, then use the following syntax:_
insert into =test-tabel values ("test",
"1234567890123456789012345678901234567890123456789012345678901234567
890" ||
"1234567890123456789012345678901234567890123456789012345678901234567
890" ||
"1234567890123456789012345678901234567890123456789012345678901234567
890" ||
"123456789012345678901234567890123456789012345");_
--- 1 row(s) inserted._
Select in SQLCI
Selecting a varchar column in SQLCI only shows the first 80 characters._
select long from testtab;_
LONG
-------------------------------------------------------------------------------------------------_
123456789012345678901234567890123456789012345678901234567890123456789012345
67890_
--- 1 row(s) selected._
If you are interested in all characters, use the report writer command SET STYLE. Change the
style-option VARCHAR_WIDTH. Maximum is 255._
set varchar_width 255;
select langejan from testtab;_
LANGEJAN_
--------------------------------------------------------------------------------_
--------------------------------------------------------------------------------_
---------------_
123456789012345678901234567890123456789012345678901234567890123456789012345
67890
123456789012345678901234567890123456789012345678901234567890123456789012345
67890
123456789012345678901234567890123456789012345678901234567890123456789012345
67890
123456789012345_
--- 1 row(s) selected._
For columns even longer than 255 bytes the LIST_COUNT-option of the SQLCI-session can be
used:_
set list_count 1;_
select constrainttext from =constrnt
where tablename like upshift(“%BTCHFILE%”);_
detail constrainttext as C3000.75;_
list first; (or short: l f )
(also list next / list all can be used)_
**** next = enter_
**** to cancel the SELECT when not all result rows are shown
cancel;_
set list_count all;_
Thursday, September 17, 2015
NSSQL : Nullable columns
|
||||||
Subscribe to:
Posts (Atom)

