Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
File connection in CICS program

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

New User


Joined: 08 Jul 2008
Posts: 37
Location: bangy

PostPosted: Sat May 16, 2009 2:39 pm    Post subject: File connection in CICS program
Reply with quote

I'm trying to read a VSAM file in a CICS program.As I'm new to CICS, I'm confused as how the connectuon is made in CICS program to a file.

I can see the command as
EXEC CICS STARTBR
DATASET('FILE1')
RIDFLD(WS-KEY)
END-EXEC.

and I found in manuals as FILE1 is the dataset name. In a COBOL program you will mention the DD name and through the JCL we will access the file.
Can any one tell me how the same functionality is achieved in a CICS program

Thanks,
Seena
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat May 16, 2009 2:52 pm    Post subject:
Reply with quote

Hello,

The file needs to previously be defined to the cics region.

Suggest you talk with your cics system support for how this file is set up and then use the appropriate name in your code. If there is an existing program that uses this same file, you might look at that code and set up your code similarly.

The big difference between what you are used to in batch is that in batch, files are directly allocated by your code. In cics, files are allocated to the cics region.
Back to top
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 193
Location: chennai

PostPosted: Sun May 17, 2009 12:53 am    Post subject: Reply to: File connection in CICS program
Reply with quote

Hi Paul1983

Quote:
and I found in manuals as FILE1 is the dataset name.


"FILE1" is not the Dataset name. It is a File name(Max. 8 char). Data set name can be up to 44 characters with separators.

Quote:
In a COBOL program you will mention the DD name and through the JCL we will access the file.

In COBOL we use an external file name in the SELECT statement that refers to DD name in JCL. In CICS-COBOL program there is no SELECT statement for an external file. This external file is to be defined to the respective CICS region in which the program is going to execute. While defining the file name in CICS region, the dataset name with respect to the file name also must be mentioned. To know more about how to define file in CICS, contact the CICS support or your senior staff.

Regards
Raghu
Back to top
View user's profile Send private message
vinit_infy
Warnings : 1

New User


Joined: 07 Apr 2005
Posts: 56

PostPosted: Tue May 19, 2009 10:36 am    Post subject:
Reply with quote

Just to add -
The file entry should be in FCT (File control table). Where your CICS support staffs define the file's ddname with the dsn name and with all the file attributes. Some time you will have to close/disable the file through cics if the same file is used for write operation in any batch job.
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 ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts The same REXX program doesnt work for... jackzhang75 CLIST & REXX 5 Wed Dec 06, 2017 2:51 am
No new posts Is CICS BMS logic on z/OS different ... Andi1982 CICS 2 Fri Dec 01, 2017 1:56 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us