Natural 4 Enhancements Module 1 Environment Changes - PowerPoint PPT Presentation

1 / 31
About This Presentation
Title:

Natural 4 Enhancements Module 1 Environment Changes

Description:

After completing this module, you will be able to: Be aware of new APIs ... USR4341N Blacklist maintenance of Natural buffer pools ... – PowerPoint PPT presentation

Number of Views:170
Avg rating:3.0/5.0
Slides: 32
Provided by: darrell66
Category:

less

Transcript and Presenter's Notes

Title: Natural 4 Enhancements Module 1 Environment Changes


1
Natural 4 Enhancements Module 1Environment
Changes
  • Presented by James Bando
  • Advisory Systems Engineer
  • Software AG, Inc.

2
Objectives
  • After completing this module, you will be able
    to
  • Be aware of new APIs
  • Be aware of compatibility issues introduced with
    Natural 4

3
Compatibility
  • Cataloged programs
  • V4.1 V2.2, 2.3, 3.1, and 4.1 cataloged programs
    may be executed
  • V4.2 V2.3, 3.1, 4.1, and 4.2 cataloged programs
    may be executed
  • V4.2 cataloged programs can only be executed in
    V4.2
  • Natural 4.1 is last version to support V2.2
    cataloged programs
  • Smaller object code
  • Only referenced fields put in the Expanded
    Variable Description Table
  • RESET is substituted whenever compiler detects
    assignment of initial value
  • Constants in cataloged object
  • V2.3 Constants stored once only if lt 10 bytes
  • V4 Constants stored once lt 1 GB
  • Larger object code
  • 4.2.3 Subroutine names are generated into the
    cataloged object for CURRENT-UNIT

4
Output Translation
Note "_at_" indicates control bytes, field markers,
3270 orders, and 3270 attribute bytes depending
on the type of buffer.
Overlay Attribute Buffer
Overlay Buffer
Message line
Program
Screen Attribute Buffer
READ WRITE END-READ
Page Attribute Buffer
Screen Buffer
Page Buffer
Physical Screen Buffer (1920 bytes for 24x80
screen)
5
Output Translation
  • Profile parameter TS
  • OFF (default) Do not translate CMPRINT output to
    upper case
  • ON Translate CMPRINT output to upper case
  • Compiler option TSENABL
  • OFF (default) Profile parameter TS only applies
    to system libraries (i.e., SYS libraries,
    except SYSTEM on FUSER)
  • ON Profile parameter TS applies to all libraries

TS001 Demo V4 Change to TS parm
OPTIONS TSENABLON / Apply TS parm to
application libraries WRITE 'This is compiled
with TSENABLON ' PROGRAM IF LEVEL 1
FETCH RETURN
'TS002' WRITE
'This is compiled with TSENABLON '
PROGRAM END-IF
END
TS002 Demo V4 Change to TS parm
OPTIONS TSENABLOFF / Do not apply TS parm
to application libraries WRITE 'This is compiled
with TSENABLOFF' PROGRAM IF LEVEL 1
FETCH RETURN
'TS001' WRITE
'This is compiled with TSENABLOFF' PROGRAM
END-IF
END
6
Output Translation
  • Prior to Natural V4
  • Programs executed with profile parm TSON
  • Output from system libraries (and application
    libraries compiled with TSENABLON) was
    translated for the entire page buffer before
    being written to the screen buffer

PAGE 1 THIS IS COMPILED WITH TSENABLON
TS001 THIS IS COMPILED WITH TSENABLOFF
TS002 THIS IS COMPILED WITH TSENABLON
TS001 Page 1 This is compiled with
TSENABLOFF TS002 This is compiled with
TSENABLON TS001 This is compiled with
TSENABLOFF TS002
7
Output Translation
  • Natural V4
  • Programs executed with profile parm TSON
  • Output from system libraries (and application
    libraries compiled with TSENABLON) will be
    translated for each field written to the page
    buffer
  • PAGE 1
  • THIS IS COMPILED WITH TSENABLON TS001
  • This is compiled with TSENABLOFF TS002
  • THIS IS COMPILED WITH TSENABLON TS001
  • Page 1
  • This is compiled with TSENABLOFF TS002
  • THIS IS COMPILED WITH TSENABLON TS001
  • This is compiled with TSENABLOFF TS002

8
Substring Mask
  • Evaluation of SUBTRING(...) MASK(...)
    CorrectedMOVE 'ABCD' TO A(A4)
    IF SUBSTR(A,1,3) MASK
    (....) WRITE 'TRUE' ELSE WRITE 'FALSE'END
  • Version 3.1
  • Page 1
    03-09-01 183131

    TRUE
  • Version 4.1
  • Page 1
    03-09-01 183446

    FALSE

NATURAL 4 If the substring is shorter than the
MASK, then the result is always false.
9
Empty Line Suppression Corrected
  • Pre-NAT413 blank line written while empty line
    suppression is active
  • NEWPAGE triggers AT END OF PAGE even if ESON is
    active and no non-blank lines have been written.

V4NEWP01 AT END OF PAGE not triggered in NAT413
and higher FORMAT ESON
WRITE NOTITLE NOHDR ' '
NEWPAGE
WRITE
NOTITLE NOHDR 'Second write'
AT END OF PAGE
WRITE 'In at-end-of-page'
MORE In at-end-of-page
MORE Second write In
at-end-of-page
10
Empty Line Suppression Corrected
  • NAT413 blank line written while empty line
    suppression is active
  • NEWPAGE does not trigger AT END OF PAGE when
    ESON is active and no non-blank lines have been
    written.
  • To force AT END OF PAGE even if no non-blank
    lines have been written

V4NEWP01 AT END OF PAGE not triggered in NAT413
and higher FORMAT ESON
WRITE NOTITLE NOHDR ' '
NEWPAGE
WRITE
NOTITLE NOHDR 'Second write'
AT END OF PAGE
WRITE 'In at-end-of-page'
MORE Second write In
at-end-of-page
FORMAT ESON WRITE NOTITLE NOHDR ' ' NEWPAGE EVEN
IF TOP OF PAGE
11
FUSER File
  • Sharing a Version 4.1 FUSER File with V4.2
  • Natural 4.1 must be at V4.1.4 service pack I003
    or higher
  • In both environments, copy the used USR modules
    from the library SYSEXT to the library SYSTEM on
    the corresponding FNAT system file
  • Compiler option V41COMPYES can be specified in
    the V4.2 environment to prevent V4.2 features
    being used

12
FUSER File
  • Source Object Header Records
  • The number of header records for Natural source
    objects have been increased and the format has
    changed
  • Only Natural utilities and API's should be used
    to read/maintain Natural objects
  • Application programs that access FUSER source
    object header records via DDM's should be changed
    to use appropriate API's
  • Header records of Natural cataloged objects has
    not changed.
  • Consider Increasing Size of FUSER
  • A constant in Natural can be up to 1GB

13
Compatibility with Natural for Open Systems
  • Compatibility with Natural Open Systems
  • Natural 4.2 is syntax compatible with Natural
    5.1.1 on Windows and Unix/Linux
  • Natural 4.2 is syntax compatible with many
    features in Natural 6.1 on Windows and Unix/Linux

14
User Application Programming Interfaces
  • Natural API's (USR)
  • Must be cataloged with 4.1/4.2, as appropriate
  • All delivered USR programs will now be cataloged
    for release
  • To use USR APIs in your applications, do one of
    the following
  • Copy the USRxxxxN subprogram to SYSTEM on FNAT,
    or
  • Add SYSEXT as a steplib for the application

The advantage using FNAT is that no position in
steplib chain is used.
The advantage steplibing SYSEXT is that you don't
have to worry about copying the API's anywhere
during your next Natural upgrade.
15
User Application Programming Interfaces
  • Using a Version 3.1 FUSER File for Natural
    Version 4.1 only orusing a Version 4.1 FUSER
    File for Natural Version 4.2 only
  • Delete all previously copied USR programs from
    FUSER file
  • Copy all used USR programs to SYSTEM on FNAT

16
User Application Programming Interfaces
  • Removed API's
  • Removed in NAT 4.1
  • USR3004N Clear internal Fast Locate Table
  • Removed in NAT 4.2
  • USR1006N Support skip-sequential processing for
    VSAM

17
User Application Programming Interfaces
  • New 4.1 API Routines (as of NAT 4.1.4)
  • USR2034N Read any error text from everywhere
  • USR2036N Convert TIMESTMP to numeric variable
  • USR2073N Ping or terminate an RPC server
  • USR2074N Set new passsword for NSC user in RPC
    context
  • USR3005N Retrieve and update Predict objects
  • USR4001N/USR6204 Set Natural profile parameter
    PROGRAM dynamically (Unix/Windows systems must
    use USR6204N)
  • USR4002N Retrieve variables of the current system
  • USR4003N Retrieve Natural stack information
  • Number of stack entries
  • Type of stack entry (command or data)
  • First 32 bytes of a stack entry

18
User Application Programming Interfaces
  • New 4.1 API Routines (as of NAT 4.1.4)
  • USR4004N Retrieve Natural dynamic parameter
  • Type and value of each entryExample
    DB(ADAV8,156),ETIDOFF,WORK((1-10),AMPC)
  • USR4005N Read all current PF-key settings
  • USR4006N Select (and cancel) Natural sessions
    under CICS
  • USR4007N Get/set current value of profile
    parameter SYNERR
  • USR4008N Set library for RPC execution
  • USR4025N Handle multiple steplibs in NSC
  • USR4340N Retrieve information about objects in BP
  • USR6002N Get the current values of some internal
    counters
  • MAINPR report number for default reports
  • Number of DBMS calls left before NAT1003
  • Number of program calls since last terminal I/O
  • Number of DBMS calls since last terminal I/O

19
User Application Programming Interfaces
  • USR4002N Retrieve variables of the current system

INIT-ID 1 8 INIT-USER
SAJGB USER SAJGB

Operating System z/OS Version
01.07.00 TP Monitor
COMPLETE Version 6.4.1
Hardware 2096 Region /
Partition Id Execution Key
SYSTEM Addressing Mode 31
VTAM Application COM005R VTAM
Netname Com-Plete Thread
Group DEFAULT Com-Plete Thrd Sub-Group
UTILITY SMARTS Runtime Version 2.7.2
CICS TOR in
MRO / IMS Id
CICS AOR System Id
CICS Task number 7 Task Id
(Non-CICS)
Logical Terminal Id
Physical Terminal Id CICS User
Id User Id known to OpSys
SAJGB Driver Name R422
Nucleus Name NAT422R Adabas
Linkage Name ADABAS
Job Name COM005R
Job Step Name
Procedure (Step) Name Pgm Name in
EXEC Card

SENDER Parameter OUTDEST
Parameter PROGRAM Parameter
UPSI Parameter XXXXXXXX
SUBSID Parameter R422
LIBNAME Parameter
20
User Application Programming Interfaces
  • New 4.2 API Routines (as of NAT4.2.2)
  • USR4009N Set parameters for EntireX
  • USR4010N Retrieve runtime settings of RPC server
  • USR4011N Create A20 hash value for variable input
  • USR4012N Support of application error
  • USR4201N Process data area sources
  • USR4202N Get code page table information
  • USR4203N Check for lock, lock or unlock Natural
    object
  • USR4204N Set or reset CICS Container name
  • USR4206N List objects in a library
  • USR4207N Return machine data
  • USR4341N Blacklist maintenance of Natural buffer
    pools
  • USR6204N Set Natural profile parameter PROGRAM

compression level, encryption level,ACI version
level
FUSER,FNAT,FSEC, steplibs
FIPS-180-1
Use in RPC server to raise NAT1999 pass back
error text to RPC client
default name NCI-COMMAREA
21
User Application Programming Interfaces
  • New 4.2 API Routines
  • USR4341N Blacklist maintenance of Natural buffer
    pools

NEXT YMENU
LIBYSAJGB NAT0393 Program
cannot be executed.
22
User Application Programming Interfaces
  • New 4.2 API Routines
  • USR4201N Process data area sources
  • Read data area from the system file, convert and
    write into source area as copycode
  • Read source from the source area, convert it into
    internal data area format and write it into the
    system file as LDA, PDA or GDA
  • Data area in source area can be
  • DEFINE DATA format
  • 96-byte layout format

0010 DEFINE DATA LOCAL
0020 1 TESTFIELD01 (A32) / Test-LDA for
USR0210P 0030 1 TESTFIELD02
0040 2 TESTFIELD03 (A16/18)
0050 END-DEFINE

0010 D 1CUSTOMER-INFO
0020 D 2CUSTOMER-NUM A
8 0030 D 2CUSTOMER-NAME
A 20 0040 DI 2CUSTOMER-YTD-ORDERS
N 7 0050 S 0

23
User Application Programming Interfaces
  • New 4.2 API Routines
  • USR4203N Check for lock, lock or unlock Natural
    object

SLOCKYES
NEXT E YMENU
LIBYSAJGB

-------------------------- Object Locked
--------------------------- !

! ! NAT7600 Object is already locked by SAJGB
on 2006-12-05 at 0256. ! !
!
!
! ! Do you want to edit
the source code but without object name? !
!
! !
N (Yes/No) ! !

! ------------------------------
--------------------------------------
24
User Application Programming Interfaces
  • New 4.2 API Routines
  • USR4207N Return machine data.

Operating System/Version z/OS 01.07.00

Manufacturer Name IBM
Machine Type 2096
Model-ID V03
CPU-ID 000000000007A10E
CEC
Plant of Manufacturer 83 CEC
Capacity 119
Partition
Name RHST Partition ID
2 Partition
Capacity 40
VM Name
VM Capacity
25
Floating Point Precision
  • More Precise Results for Floating Point
    Conversion
  • F(F8) 5.4E-79
  • Result with Version 3.1 5.399999999999999E-79Re
    sult with Version 4.1 5.400000000000000E-79

26
Floating Point Precision
  • Precision of Floating Point Format Results of an
    Arithmetic Operation Improved
  • With F4 variables, F8 used for intermediate
    results
  • NAT3 results
  • NAT4 results

FLOAT1 TEST INTERMEDIATE RESULTS OF FLOATING
POINT CALCULATIONS MULT1(F4) 4.123456E6
MULT2(F4) 8.123456E6 DIVISOR(F4) 33
ANSWER(F8) (MULT1 MULT2) / DIVISOR
WRITE 'One calc statement
' ANSWER 'comment varies' ANSWER MULT1 MULT2

ANSWER ANSWER / DIVISOR
WRITE 'Two calc
statements' ANSWER ' No Intermediate
results'
One calc statement 1.015051563628606E12
lt-Nat3 Intermediate results F4 Two calc
statements 1.015051920725333E12 No
Intermediate results
One calc statement 1.015051920725333E12
lt-Nat4 Intermediate results F8 Two calc
statements 1.015051920725333E12 No
Intermediate results
27
Utilities
  • Utilities "Hidden" with Natural 4.2
  • SYSTRANS
  • NATUNLD/NATLOAD
  • The utilities are still shipped with Natural 4.2,
    but are not documented They will be removed from
    future releases
  • Utilities Discontinued with Natural 4.1
  • NTCPC discontinued (i.e., not shipped) as of
    Natural 4.1.1

28
Unicode Support
  • Natural 4.2 supports Unicode
  • Natural kernel and utilities support Unicode
  • New variable format (U) used to store Unicode
    data
  • MOVE, COMPRESS, and EXAMINE statements enhanced
    to support Unicode

29
Debugger
  • V4.2 Debugger Enhancements
  • Allow break point settings in copycodes

-------------- NATURAL Debug Utility
-------------- ! Break by breakpoint
V4DEBG1C0020 ! ! at line 20 in
copycode V4DEBG1C (level 1) ! ! included
from lib YSAJGB in file (156,31) ! ! at
line 100 in program V4DEBG1P (level 1)
! ! in library YSAJGB in system file (156,31).
! !
! ! G Go
! ! L List break
! ! M Debug main menu
! ! N Next break
command ! ! R Run
(set test mode OFF) ! ! S
Step mode ! !
V Variable maintenance ! !
! !
Code .. G
! !
! !
! ! PF2Step,PF13Next,PF14Go,PF15Menu,P
F17SkipS ! -----------------------------------
----------------
30
Debugger
  • V4.2 Debugger Enhancements
  • Allow watch point settings for system variables
  • DBGERRON profile parameter starts the Natural
    debugger automatically if a Natural error occurs
    at runtime

31
Questions and Answers
Write a Comment
User Comments (0)
About PowerShow.com