IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to use alternate index in COBOL


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jitu852

New User


Joined: 30 Apr 2007
Posts: 27
Location: Hyderabad

PostPosted: Fri Jul 18, 2008 12:01 pm
Reply with quote

Hi,

i want to know how to define the FD section for ALTERNATE INDEX

Details:

i have a VSAM for which the key is 0-40(ie 05 KEY
10 FRST PIC X.
10 LST PIC X(40). )

My reqirement is to access using key the ( 10 LST PIC X(40). ) only for which i ctreated a aternate index for it having my requirement but
i am not able to use it in my cobol prog.

can any body describe how the FD section describe for it.
Back to top
View user's profile Send private message
Rajesh Sampath

New User


Joined: 18 Jun 2008
Posts: 9
Location: Pune

PostPosted: Fri Jul 18, 2008 1:14 pm
Reply with quote

Hi Jitu,

Very Simple..

While define the file-control mention your record key & alternate key thats all.

Nothing special in the FD section. Define, before as u define

with Regard

Rajesh Sampath
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Jul 18, 2008 4:51 pm
Reply with quote

When you say
Quote:
i am not able to use it in my cobol prog.
are you getting a compile error? Are you getting a run-time error? What is/are the error message(s) -- quote and paste them so the precise message is shown.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue Jul 22, 2008 6:24 pm
Reply with quote

Try the cobol pgmmer's guide for your compiler.

The light grey bar at the top of this panel has a link to IBM manuals. You should find info regarding your problem.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 2
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top