Thursday, September 16, 2010

Boost your application performance using SET NEWCOPY

Caching a program saves reloading costs thereby improving the performance.
The SET PROGRAM NEWCOPY or SET PROGRAM COPY (NEWCOPY) or SET PROGRAM PHASEIN or SET PROGRAM COPY (PHASEIN) commands for a Micro Focus Server Express COBOL or Net Express program removes every program that was previously loaded by the application server, so that a fresh copy of every such program is used after one of these commands is run.
Here we will learn how SET NEWCOPY works in Windows for both .cbmfnt and .gnt files.

1.First create a region "cicscp -v create region test123"(say region name is test123)
2.Take a simple "hello world" program (P1) in COBOL.
Take another program (P2) to be written with EXEC CICS SET PROGRAM(P1) NEWCOPY.

3.TD,PD entries are added for the first program
cicsadd -c td -r test123 QWER ProgName=P1 which will add the transaction definition entry.
cicsadd -c pd -r test123 P1 PathName=hello where hello is the executable.
Similarly TD,PD entries are added for the second program.

4.Then compile both the programs using cicstcl –elCOBOL .ccp to generate .cbmfnt files" where .ccp is ur cobol program.
Cold start the region using "cicscp -v start region test123 StartType=cold"
5.Do a cicsteld and run the transaction of the first program "P1"and observe the output.
Modify this program and recompile.
6.Now run transaction of the second program P2 once, and then run for P1 again. Observe the output,it should reflect the changes made in the first program.

The same scenario can be run using the following:

Steps to generate .gnt file on windows:
SET COBCPY=C:\opt\cics\include

No comments:

Post a Comment