View previous topic :: View next topic
|
Author |
Message |
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Hi all,
I would like to ask if someone knows if there's a method of changing a VSAM file name dynamically.
For example, if my program contains EXEC CICS READ FILE('EMPDEV'), can I trick CICS and point it to read another file (for example - 'EMPTST').
Please note that I need to change the file name, not the dataset name (which could be easily accomplished using SPI - EXEC CICS SET FILE). Also, I don't want to alter the program code.
Any hint will be highly appreciated.
O. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
That might be true. Still, I want to be able to route, for specific EXEC CICS READs the file names for a particular program. I guess I'm looking for some kind of a CICS/FCT user exit.
O. |
|
Back to top |
|
|
Jose Mateo
Active User
Joined: 29 Oct 2010 Posts: 121 Location: Puerto Rico
|
|
|
|
You could have symbolic field on the EXEC CICS READ (Filename) and somewhere in your program you would move the file name to the symbolic field but you would need to have the file define to the CICS partition. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
That won't work either.
Here's the general view: I have a ready application, already working in production. I can't (and don't want to) touch the source code.
For test purposes, I need multiple users to concurrently run the same program. However - I want to provide each with its own input files.
I know how to define VSAM files dynamically using EXCI and SET FILE. My only problem is how to route each user's invocation to the appropriate file, without touching the program.
Thanks,
O. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
O.,
sounds as if you are going to enter the wonderful world of cics exits.
send bill boyle a pm, he knows about that stuff.
Quote: |
My only problem is how to route each user's invocation to the appropriate file, without touching the program.
|
before I would play with exits, i would rather try to set up a region for each user .......
plus, you would have a model for future situations like this. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Ofer,
Check your PM's as I sent one a few minutes ago.
Bill |
|
Back to top |
|
|
valyk
Active User
Joined: 16 Apr 2008 Posts: 104 Location: South Carolina
|
|
|
|
Why not just create several AOR's and define a unique transactions pointing to the same program but to different AOR's. Then have each user start a different transaction which allows them to run in a certain AOR and use different files. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
In a PM I sent to Ofer earlier in the day, I suggested this can be accomplished in an exit-program defined to GLUE XFCREQ.
All we need to know is what the logic/circumstances would be to change the file name and go from there.
It may be as easy as changing EIBDS in the exit-program, but I need to research this a bit more as it probably would be best to point to one of the EID (not EIB) addresses in DFHUEPAR (the GLUE parmlist) and make the necessary change(s).
Bill |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Thanks, Bill (also PM'med)
I myself was looking at XFCREQ, but sadly - my knowledge in CICS stops after SPI commands and EXCI...
What we are doing is - we create a "logical" environment for each tester: An environment has its own unique ID, and it is reflected in transaction names, DB2 plans, ADABAS file switching and creating a unique set of VSAM files for each environment.
As told - the application itself remains untouched. We play only with the input data (and actually, we capture each output of each environment).
So, for a specific transaction, we need to alter the file names "on the fly".
For example:
Transaction names could be: TTAA, TTAB, TTAC etc, where AA, AB, AC are the environment IDs.
Next, I have a program with EXEC CICS READ FILE('EMP').
If it was executed by transaction TTAA, I need CICS to look for file 'ENVAAF1' (environment AA, file number 1).
Hope you got the idea.
Thanks in advance for any input.
O. |
|
Back to top |
|
|
Itanium
Active User
Joined: 22 Jan 2006 Posts: 114 Location: India
|
|
|
|
ofer71 wrote: |
What we are doing is - we create a "logical" environment for each tester: An environment has its own unique ID, and it is reflected in transaction names, DB2 plans, ADABAS file switching and creating a unique set of VSAM files for each environment.
As told - the application itself remains untouched. We play only with the input data (and actually, we capture each output of each environment).
|
this sounds too crazy, what would be done if there are more users added later ? the same configuration update to be done for all ? |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Crazy, but doable. Actually, with the help of Bill, I was able to do it with GLUE. The file renaming rules are in a table, which could always be expanded.
O. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Ofer,
Glad to hear that it worked.
I was thinking that because the GLUE Exitprogram could issue CICS API's, instead of the in-core table, you could define all the records in a VSAM/KSDS and define the file in its FCT entry as a CICS Datatable (Read Only), whose speed rivals that of an in-core table.
Bill |
|
Back to top |
|
|
|