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
 
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: 8218
Location: Dubuque, Iowa, 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: 8218
Location: Dubuque, Iowa, 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 COB2 file processing rizwanaccy COBOL Programming 8 Tue Jan 02, 2018 1:00 pm
No new posts KSDS and Index file in cobol deepak14450 COBOL Programming 9 Fri Dec 22, 2017 9:36 am
No new posts Preserve order in Input File pshongal DFSORT/ICETOOL 13 Thu Dec 21, 2017 4:20 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am

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