Transcript Assortment of 2004 Tips and Tricks (PowerPoint)
GDT Tips and Tricks
GDT Tips and Tricks
Dynamic File Assignments (a GCOS7 feature) Handled by Micro Focus or the GDT Preprocessor?
Debug a program quickly Just-In-Time Debugging GDT’s Global Editing with a Find and Replace Utility Easily locate files with the GDTWHERE utility Creating an Environment on Developers machine to test a Production Thin Client issue quickly!
GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
GDT Tips and Tricks
GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
GDT Tips and Tricks Dynamic File Assignments
No Assign Statement in the JCL for the Report
Below is the JCL before commenting out the Assign Statement GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
GDT Tips and Tricks Dynamic File Assignments
No Assign Statement in the JCL for the Report
Below shows the commented out Assign for the report GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
GDT Tips and Tricks Dynamic File Assignments
The program Select statement for this file will state that the file is in Queued Sequential Format GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
GDT Tips and Tricks Dynamic File Assignments
At runtime, the ASG statement in the Procedure Division, will create the file dynamically GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
GDT Tips and Tricks Dynamic File Assignments
The Batch Process is Initiated GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
GDT Tips and Tricks Dynamic File Assignments
We will look at the process via the Animator
After the ASSIGN statement is processed, the RPT NAME contains the appropriate name and path GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
GDT Tips and Tricks Dynamic File Assignments
Here we are viewing the Status of the PRINT FILE after the open GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
GDT Tips and Tricks Dynamic File Assignments
The Job Completes GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
GDT Tips and Tricks Dynamic File Assignments
The Report is Generated dynamically!
GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
Handled by Micro Focus or the GDT Pre-processor?
The Pre-processor via GDT handles the special GCOS7 feature statements GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
Handled by Micro Focus or the GDT Pre-processor?
How do I find out when a GCOS related COBOL statement is being handled internally via GDT and not Micro Focus?
Set the TRACE parameter in your PPGCOS.DIR file.
This creates a PPGCOS.OUT file and traces each line of COBOL code as it is being compiled.
It also shows how GDT captures these GCOS specific statements and processes them via special GDT calls to GDT internal programs.
Compile your program.
Review the PPGCOS.OUT file.
GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
Handled by Micro Focus or the GDT Pre-processor?
Set the trace directive in PPGCOS directives file Compile the program GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
Handled by Micro Focus or the GDT Pre-processor?
GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
Handled by Micro Focus or the GDT Pre-processor?
GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
Debug a program quickly
CALL “CBL_DEBUGBREAK”
This call-by-name routine will raise a simple Dialog when the program is executed.
You can then select Animation of the program or just run the program without Animation
If you select Animation
IDE will be started
Animator will come up and show the source code
You can now step through the code
When finished you shut down the IDE GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
Debug a program quickly
Setup
Modify the compiler .bat file to add 2 more parameters at the end of the compile statement
CONSTANT parameter – this allows you to pass a constant as the next parameter
DEBUGBREAK ‘YES’ or ‘NO’ parameter
The 2 parameters will give you flexibility in leaving the CALL “CBL_DEBUGBREAK” in your source code even when you do not want to run the DEBUGBREAK.
GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
Debug a program quickly
Setup
(continued)
Modify the source code
Add “$ IF statement” to determine if DEBUGBREAK is set to YES when compiling.
Compile the source program
COMPIL source program CONSTANT DEBUGBREAK ‘YES’ or ‘NO’ GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
Debug a program quickly
Add %7 and %8 to compile statement in COMPIL.BAT.
This will capture the CONSTANT and DEBUGBREAK parameters passed via the command line GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
Debug a program quickly
Add appropriate code in source to check if DEBUGBREAK was requested via the COMPIL statement This piece of code can be setup as a copybook and used in all programs Compile the program accordingly GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
Just-In-Time Debugging
A way to automatically trigger the Net Express Animator when an application that is executed outside the IDE fails.
Start Net Express
Click on Options drop down list and select Animate Select “Just-In-Time Debugging” from the drop down list in Error Handling Click the OK button Close out of Net Express GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
Just-In-Time Debugging
For test
CBLRTN program will make a CALL to routine not defined CBLRTN is compiled for animate mode GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
Just-In-Time Debugging
For Test
GDTBATCH \INFOSOL\PROD\JCL\CBLRTN.JCL
GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
Just-In-Time Debugging
Animator is automatically invoked
Error is defined on first dialog message box Animator places you right on the line causing the problem!
GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
Just-In-Time Debugging
MAKE SURE to change back to “DEFAULT” debugging option once done with Just-In-Time debugging
In production environment, Just-In-Time debugging can stop production use of transactions!
Just-In-Time programming will disable any error trapping for GDT. Only MicroFocus error trapping will be done GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
GDT’s Global Editing with a Find and Replace Utility
Format
GDTRPL01 SearchExp, SearchStr, NewStr, Param Parameter /UC to use case insensitive search Definition
Searches for all files in Search Expression, for the string defined in the New String expression (case sensitive or case insensitive GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
Easily locate files with the GDTWHERE utility
GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
Easily locate files with the GDTWHERE utility
The GDTWHERE utility in action!
Locate all locations of a file
Based on your Local Directory Based on environment variables set GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
Creating an Environment on Developers machine to test a Production Thin Client issue quickly!
GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
Creating an Environment on Developers machine to test a Production Thin Client issue quickly!
The Setup
Create a directory on Developer’s Machine to contain: (C:\CUSTOMER for this example)
Cobol programs from production
Cobol.dir and Ppgcos.dir
GDTMONR.PAR modified to make sure the FLOW, DISP and SWAPL settings point to C:\CUSTOMER
GDTSRV03.BAT modified to run a work environment .bat file from the C:\CUSTOMER file and RUNMW GDTSRV03 /S 4/ P 3334 (where port 3334 is a different port than what is used on production server for it’s transaction servers).
CCITCP2 should be running on Developers Machine GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
Creating an Environment on Developers machine to test a Production Thin Client issue quickly!
The Setup
C:\CUSTOMER Contents Continued :
The work environment .bat file should be modified
Add c:\customer to COBDIR setting COBOL setting should be set to c:\customer c:\customer needs to be added to PATH setting All references to Net Express folders should point to Developers machine installation of Net Express
All other mappings should point to Production Server folders
GDTMONFH.JCL and GDTMONFH.GNT from production
Modify GDTMONFH.JCL M W GTWFILE $$fileshare\GTWFILE1
.ASP file in \INETPUB\WWWROOT
Make sure Config_ServerAddr = 3334 or port used in GDTSRV03.BAT runmw statement GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans
Creating an Environment on Developers machine to test a Production Thin Client issue quickly!
To Startup the Test Environment
Start ccitcp2 on developers machine From c:\customer, type in GDTSRV03 and press enter to start the GDTTXMonitor and transaction servers on the developer’s machine
Add the CBL_DEBUGBREAK for any programs you wish to animate
Run TEST.BAT via c:\customer folder to set the environment and start the thin client session GDT 2004 International User Conference – July 11 - 14
Tucson, Arizona Evolving the Legacy GDT Tips and Tricks Doug Evans