View previous topic :: View next topic
|
Author |
Message |
ashok_uddaraju
New User
Joined: 21 Feb 2007 Posts: 72 Location: US
|
|
|
|
Hi,
can someone please let me know the code or logic for testing if an online CICS file is opened and enabled.
Regards,
Ashok |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
ashok_uddaraju
New User
Joined: 21 Feb 2007 Posts: 72 Location: US
|
|
|
|
Code: |
ID DIVISION.
PROGRAM-ID. COBTEST
DATA DIVISION.
PROCEDURE DIVISION.
PERFORM 100-TEST-PARA.
100-TEST-PARA.
EXEC CICS
INQUIRE FILE('CPILOG')
ENABLESTATUS(CVDA)
OPENSTATUS(CVDA)
END-EXEC. |
Here my online file name is CPILOG. Can you please let me know if this would work ? Or esle can someone please put in the modified code? |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Each CVDA must be a unique WS field, defined as PIC S9(09) COMP. This INQUIRE will only return the requested results when the file is LOCAL to the given region.
After issuing the API, you would check -
Code: |
IF OPEN-CVDA = DFHVALUE(OPEN)
IF ENABLED-CVDA = DFHVALUE(ENABLED)
|
In the API, you could add the REMOTESYSTEM keyword, as a PIC X(04) WS field. If the value returned to this PIC X(04) is NOT SPACES, then the file is REMOTE and represents the SYSID of the REMOTE region.
Bill |
|
Back to top |
|
|
ashok_uddaraju
New User
Joined: 21 Feb 2007 Posts: 72 Location: US
|
|
|
|
Bill,
Can you give me the code here |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
ashok_uddaraju wrote: |
Can you give me the code here |
He just did.....
BTW, what is an's.e."? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
CICS Guy wrote: |
BTW, what is an's.e."? |
Most probably, Software Engineer... |
|
Back to top |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
The EXEC CICS INQUIRE command is often restricted
to CICS System programmers use only.
Requires a special param option when using
the CICS translator.
If you experience compile problems, you will need to
contact you System Support group. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Earl Haigh wrote: |
The EXEC CICS INQUIRE command is often restricted to CICS System programmers use only. |
Or the OP could just test the retun code on the READ/WRITE/etc for DISABLED and NOTOPEN..... |
|
Back to top |
|
|
|