Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Changing VSAM file name dynamically under CICS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Sun Nov 07, 2010 6:13 pm    Post subject: Changing VSAM file name dynamically under CICS
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Sun Nov 07, 2010 7:50 pm    Post subject:
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)

http://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: 2360
Location: Israel

PostPosted: Sun Nov 07, 2010 7:54 pm    Post subject: Reply to: Changing VSAM file name dynamically under CICS
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: 110
Location: Puerto Rico

PostPosted: Mon Nov 08, 2010 9:01 pm    Post subject: Reply to: Changing VSAM file name dynamically under CICS
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: 2360
Location: Israel

PostPosted: Mon Nov 08, 2010 10:00 pm    Post subject:
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    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Tue Nov 09, 2010 8:00 pm    Post subject: Reply to: Changing VSAM file name dynamically under CICS
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    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed Nov 10, 2010 12:04 am    Post subject: Reply to: Changing VSAM file name dynamically under CICS
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: 2360
Location: Israel

PostPosted: Wed Nov 10, 2010 12:14 am    Post subject:
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    Post subject:
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: 2360
Location: Israel

PostPosted: Fri Nov 19, 2010 12:07 am    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Nov 19, 2010 12:45 am    Post subject: Reply to: Changing VSAM file name dynamically under CICS
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    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us