Presentation is loading. Please wait.

Presentation is loading. Please wait.

GDT Tips and Tricks. GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona GDT Tips.

Similar presentations


Presentation on theme: "GDT Tips and Tricks. GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona GDT Tips."— Presentation transcript:

1 GDT Tips and Tricks

2 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona 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!

3 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona GDT Tips and Tricks

4 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona GDT Tips and Tricks Dynamic File Assignments  No Assign Statement in the JCL for the Report n Below is the JCL before commenting out the Assign Statement

5 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona GDT Tips and Tricks Dynamic File Assignments  No Assign Statement in the JCL for the Report n Below shows the commented out Assign for the report

6 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona GDT Tips and Tricks Dynamic File Assignments  The program Select statement for this file will state that the file is in Queued Sequential Format

7 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona GDT Tips and Tricks Dynamic File Assignments  At runtime, the ASG statement in the Procedure Division, will create the file dynamically

8 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona GDT Tips and Tricks Dynamic File Assignments  The Batch Process is Initiated

9 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona GDT Tips and Tricks Dynamic File Assignments  We will look at the process via the Animator n After the ASSIGN statement is processed, the RPT- NAME contains the appropriate name and path

10 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona GDT Tips and Tricks Dynamic File Assignments  Here we are viewing the Status of the PRINT- FILE after the open

11 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona GDT Tips and Tricks Dynamic File Assignments  The Job Completes

12 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona GDT Tips and Tricks Dynamic File Assignments  The Report is Generated dynamically!

13 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona Handled by Micro Focus or the GDT Pre-processor?  The Pre-processor via GDT handles the special GCOS7 feature statements

14 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona 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? n Set the TRACE parameter in your PPGCOS.DIR file. l This creates a PPGCOS.OUT file and traces each line of COBOL code as it is being compiled. l It also shows how GDT captures these GCOS specific statements and processes them via special GDT calls to GDT internal programs. n Compile your program. n Review the PPGCOS.OUT file.

15 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona Handled by Micro Focus or the GDT Pre-processor?  Set the trace directive in PPGCOS directives file  Compile the program

16 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona Handled by Micro Focus or the GDT Pre-processor?

17 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona Handled by Micro Focus or the GDT Pre-processor?

18 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona Debug a program quickly  CALL “CBL_DEBUGBREAK” n This call-by-name routine will raise a simple Dialog when the program is executed. n You can then select Animation of the program or just run the program without Animation n If you select Animation l IDE will be started l Animator will come up and show the source code l You can now step through the code l When finished you shut down the IDE

19 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona Debug a program quickly  Setup n Modify the compiler.bat file to add 2 more parameters at the end of the compile statement l CONSTANT parameter – this allows you to pass a constant as the next parameter l DEBUGBREAK ‘YES’ or ‘NO’ parameter l 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.

20 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona Debug a program quickly  Setup (continued) n Modify the source code l Add “$ IF statement” to determine if DEBUGBREAK is set to YES when compiling. n Compile the source program l COMPIL source program CONSTANT DEBUGBREAK ‘YES’ or ‘NO’

21 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona 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

22 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona 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

23 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona Just-In-Time Debugging  A way to automatically trigger the Net Express Animator when an application that is executed outside the IDE fails. n Start Net Express n Click on Options drop down list and select Animate n Select “Just-In-Time Debugging” from the drop down list in Error Handling n Click the OK button n Close out of Net Express

24 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona Just-In-Time Debugging  For test n CBLRTN program will make a CALL to routine not defined n CBLRTN is compiled for animate mode

25 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona Just-In-Time Debugging  For Test n GDTBATCH \INFOSOL\PROD\JCL\CBLRTN.JCL

26 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona Just-In-Time Debugging  Animator is automatically invoked n Error is defined on first dialog message box n Animator places you right on the line causing the problem!

27 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona Just-In-Time Debugging  MAKE SURE to change back to “DEFAULT” debugging option once done with Just-In-Time debugging n In production environment, Just-In-Time debugging can stop production use of transactions! n Just-In-Time programming will disable any error trapping for GDT. Only MicroFocus error trapping will be done

28 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona GDT’s Global Editing with a Find and Replace Utility  Format n GDTRPL01 SearchExp, SearchStr, NewStr, Param n Parameter /UC to use case insensitive search  Definition n Searches for all files in Search Expression, for the string defined in the New String expression (case sensitive or case insensitive

29 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona Easily locate files with the GDTWHERE utility

30 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona Easily locate files with the GDTWHERE utility  The GDTWHERE utility in action!  Locate all locations of a file n Based on your Local Directory n Based on environment variables set

31 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona Creating an Environment on Developers machine to test a Production Thin Client issue quickly!

32 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona Creating an Environment on Developers machine to test a Production Thin Client issue quickly!  The Setup n Create a directory on Developer’s Machine to contain: (C:\CUSTOMER for this example) l Cobol programs from production l Cobol.dir and Ppgcos.dir l GDTMONR.PAR modified to make sure the FLOW, DISP and SWAPL settings point to C:\CUSTOMER l 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). l CCITCP2 should be running on Developers Machine

33 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona Creating an Environment on Developers machine to test a Production Thin Client issue quickly!  The Setup n C:\CUSTOMER Contents Continued : l 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 l GDTMONFH.JCL and GDTMONFH.GNT from production  Modify GDTMONFH.JCL M W GTWFILE $$fileshare\GTWFILE1 l.ASP file in \INETPUB\WWWROOT  Make sure Config_ServerAddr = 3334 or port used in GDTSRV03.BAT runmw statement

34 GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona Creating an Environment on Developers machine to test a Production Thin Client issue quickly!  To Startup the Test Environment n Start ccitcp2 on developers machine n From c:\customer, type in GDTSRV03 and press enter to start the GDTTXMonitor and transaction servers on the developer’s machine n Add the CBL_DEBUGBREAK for any programs you wish to animate n Run TEST.BAT via c:\customer folder to set the environment and start the thin client session


Download ppt "GDT Tips and Tricks. GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July 11 - 14  Tucson, Arizona GDT Tips."

Similar presentations


Ads by Google