IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Changing VSAM file name dynamically under CICS


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sun Nov 07, 2010 6:13 pm
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Sun Nov 07, 2010 7:50 pm
Reply with quote

If you can change the dsn with "set file", i guess you can also change the filename.

SET FILE(filename) DSNAME(datasetname)

publib.boulder.ibm.com/infocenter/cicsts/v4r1/index.jsp?topic=/com.ibm.cics.ts.doc/dfha7/transactions/cemt/dfha74i.html
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sun Nov 07, 2010 7:54 pm
Reply with quote

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
View user's profile Send private message
Jose Mateo

Active User


Joined: 29 Oct 2010
Posts: 121
Location: Puerto Rico

PostPosted: Mon Nov 08, 2010 9:01 pm
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Nov 08, 2010 10:00 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Nov 08, 2010 11:26 pm
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Tue Nov 09, 2010 8:00 pm
Reply with quote

Ofer,

Check your PM's as I sent one a few minutes ago.

Bill
Back to top
View user's profile Send private message
valyk

Active User


Joined: 16 Apr 2008
Posts: 104
Location: South Carolina

PostPosted: Tue Nov 09, 2010 11:14 pm
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed Nov 10, 2010 12:04 am
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Nov 10, 2010 12:14 am
Reply with quote

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
View user's profile Send private message
Itanium

Active User


Joined: 22 Jan 2006
Posts: 114
Location: India

PostPosted: Thu Nov 18, 2010 10:31 pm
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Fri Nov 19, 2010 12:07 am
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri Nov 19, 2010 12:45 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Using API Gateway from CICS program CICS 0
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top