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
 

 

How to inquire the keyposition and keylength of a file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ankit saxena

New User


Joined: 06 Oct 2010
Posts: 55
Location: india

PostPosted: Tue Oct 26, 2010 6:44 pm    Post subject: How to inquire the keyposition and keylength of a file
Reply with quote

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
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Tue Oct 26, 2010 6:56 pm    Post subject:
Reply with quote

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
View user's profile Send private message
ankit saxena

New User


Joined: 06 Oct 2010
Posts: 55
Location: india

PostPosted: Tue Oct 26, 2010 7:25 pm    Post subject: re
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Tue Oct 26, 2010 7:35 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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