View previous topic :: View next topic
|
Author |
Message |
ankit saxena
New User
Joined: 06 Oct 2010 Posts: 55 Location: india
|
|
|
|
hi all,
i am trying to fetch the keyposition and key length of a file using
EXEC CICS
INQUIRE
FILE(FCT1)
KEYLENGTH(KEYL)
KEYPOSITION(KEYP)
RESP(RESPONSE-CODE)
END-EXEC
DISPLAY ' KEY POSITION ' KEYP
DISPLAY ' KEY LENGTH ' KEYL
but when i am displaying the value of keyl and keyp its not showing any thing
CAG2NG57 20101026182718 KEY POSITION
CAG2NG57 20101026182718 KEY LENGTH
can any of you please check what is the problem... |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Since we don't have access to your system, I doubt we can "check what is the problem" -- only someone at your site could do this.
Possible problems I see:
1. File FCT1 is closed and the key data is not part of the definition -- the fields will be zero in this case (and no, the inquiry does not open the file).
2. KEYP is not a fullword binary field.
3. KEYL is not a fullword binary field.
4. FCT1 is not defined as a file to the CICS region. |
|
Back to top |
|
|
ankit saxena
New User
Joined: 06 Oct 2010 Posts: 55 Location: india
|
|
|
|
Hey thanks
can u please tell me what exact is the picture clause for full word binary.
and can u tell me if i am using a copybook in a CICS- COBOL pgm
and i am having a field of
01 A PIC 9(R).
so now i want to change (R) to a value provide by online CICS program .
is it possible ??? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Code: |
77 KEYP PIC S9(08) COMP-5. |
will define the variable as a fullword binary variable. Using COMP-5 for CICS is better than using COMP as you don't have to worry about compiler options with COMP-5.
The value R must be filled in before the program is compiled. Hence, by definition, you cannot provide R in an online CICS program. COBOL requires every variable length be known at compile time. |
|
Back to top |
|
|
|