× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



If your file is externally described, you would use the following:-

Move 10 to Dept-number
Move zeros to Section-Number
                  Employee-Number.

Start Employee File
 Key is Not Less Than Externally-Described-Key
 Invalid key
  -----
Not invalid key
 -----
End-Start.

This only works, if you know the value of the first key.

HTH

JP
-----Original Message-----
From: cobol400-l-admin@midrange.com
[mailto:cobol400-l-admin@midrange.com] On Behalf Of Ravi Prasanna
Annasagara Nagarajan
Sent: Friday, September 06, 2002 9:43 AM
To: cobol400-l@midrange.com
Subject: Setting File pointer using Partial Keys


This is a multi-part message in MIME format.
--
--
[ Picked text/plain from multipart/alternative ]
Hello,

Using Start statement, can we position the file pointer if we have
values for a part of the key.

For example

If an Employee file has 3 keys say Dept number, Section number and
Employee number, using just the Dept number can we position the file at
the specified Dept number even though Section number and Employee number
are not specified?


Move 10 to Dept-number

Start Employee File
 Key is equal to Dept-number
 Invalid key
  -----
Not invalid key
 -----
End-Start.


I have tried this but it seems to fail.  In RPG, we can actually do a
Chain to the file with partial keys, so is there a provision for that in
Cobol?

Any thoughts on this issue would be very helpful?

Many thanks in advance.


Regards,
Ravi Prasanna A.N.
Wipro Technologies Ltd.,
mailto:ravi.annasagara@wipro.com

--


--
**************************Disclaimer************************************

Information contained in this E-MAIL being proprietary to Wipro Limited
is 'privileged' and 'confidential' and intended for use only by the
individual  or entity to which it is addressed. You are notified that
any use, copying or dissemination of the information contained in the
E-MAIL in any manner whatsoever is strictly prohibited.

************************************************************************
***
--

_______________________________________________
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing
list To post a message email: COBOL400-L@midrange.com To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/cobol400-l
or email: COBOL400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.