View previous topic :: View next topic
|
Author |
Message |
bhuspin
New User
Joined: 13 Aug 2008 Posts: 26 Location: chennai
|
|
|
|
Can we read a dataset using a cobol program, the condition is the dataset doesn't have a FCT entry in cics-cobol program |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
No. . .
Why is this an issue for your requirement? |
|
Back to top |
|
|
bhuspin
New User
Joined: 13 Aug 2008 Posts: 26 Location: chennai
|
|
|
|
ok thanks DICK |
|
Back to top |
|
|
namitjai
New User
Joined: 12 Feb 2008 Posts: 41 Location: Bangalore
|
|
|
|
Hi,
Can a cobol-cics program(pgm1) call a cobol program which is not a cics program(pgm2) and is reading a flat file.
If its possible than how are we going to make entry of flat file used by pgm2 into FCT.
If its not possible than can pgm1 call pgm2 where pgm2 is using a vsam file instead of flat file.
Also can pgm2 read the file using READ FILE command or it has to use EXEC CICS READ(file) command.
Thanks, |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
The only supported way to read a flat file in CICS is by defining it as extra-partition TD queue. Do NOT try to use non-CICS means to access files.
Garry. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
Can a cobol-cics program(pgm1) call a cobol program which is not a cics program(pgm2) and is reading a flat file.
If its possible than how are we going to make entry of flat file used by pgm2 into FCT.
If its not possible than can pgm1 call pgm2 where pgm2 is using a vsam file instead of flat file.
Also can pgm2 read the file using READ FILE command or it has to use EXEC CICS READ(file) command. |
Oracle Robert's prediction: there's a CICS region on its way down sometime soon.
Flat files can be extrapartition transient data queues. They cannot be added to an FCT.
A CICS COBOL program can call a COBOL program. If the called program attempts to do anything with a file (such as OPEN it), the called program will abend and it might take the entire CICS region down with it. CICS does not play well with the operating system functions inherent in the OPEN macro used by COBOL.
You have several choices: (1) convert the file being read by the called program into a table in the program, (2) remove all file logic from the called program and change the READ to READQ TD so the flat file can be added as a TDQ to the region, (3) convert the flat file to a VSAM file, add the VSAM file to the FCT, remove the called program file logic and replace the READ with a CICS READ command, or (4) figure out a way to do your function outside of CICS. |
|
Back to top |
|
|
namitjai
New User
Joined: 12 Feb 2008 Posts: 41 Location: Bangalore
|
|
|
|
So that means that a Cics cobol program will not be able to call a normal cobol program(no cics commands) which is performing READ file command. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Correct -- but if the called COBOL program has no file I/O commands in it, there is no problem with CICS programs calling COBOL programs. |
|
Back to top |
|
|
namitjai
New User
Joined: 12 Feb 2008 Posts: 41 Location: Bangalore
|
|
|
|
That answers to my question
Thanks, |
|
Back to top |
|
|
|