View previous topic :: View next topic
|
Author |
Message |
Prabha Warnings : 2 New User
Joined: 05 Dec 2005 Posts: 79
|
|
|
|
While using Search, if array uses Indexed by keyword, then do we need to set the Index value to 1. Or by default it will take it as 1. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
SEARCH is a command which is executed against an internal cobol table. array is a term used in other programming languages.
If you would spend 10 seconds looking at the search syntax you would have your answer.
Quote: |
___ Format 1--serial search ____________________________________________
| |
| >>__SEARCH__identifier-1__ ___________________________ ______________> |
| |_VARYING__ _identifier-2_ _| |
| |_index-name-1_| |
| |
| >__ _____________________________________ ___________________________> |
| |_ ____ __END__imperative-statement-1_| |
| |_AT_| |
| |
| <_______________________________________________ |
| >____WHEN__condition-1__ _imperative-statement-2_ _|_________________> |
| |_NEXT-SENTENCE__________| |
| |
| >__ ____________ ___________________________________________________>< |
| |_END-SEARCH_| |
| |
|________________________________________________________________________|
|
Quote: |
___ Format 2--binary search ______________________________________________________________________
| |
| >>__SEARCH ALL__identifier-1__ _____________________________________ __________________________> |
| |_ ____ __END__imperative-statement-1_| |
| |_AT_| |
| |
| >__WHEN__ _data-name-1__ ____ __ _EQUAL__ ____ _ __ _identifier-3____________ _ _______________> |
| | |_IS_| | |_TO_| | |_literal-1_______________| | |
| | |_=_____________| |_arithmetic-expression-1_| | |
| |_condition-name-1____________________________________________________| |
| |
| <__________________________________________________________________________________ |
| >____ ______________________________________________________________________________ _|________> |
| |_AND__ _data-name-2__ ____ __ _EQUAL__ ____ _ __ _identifier-4____________ _ _| |
| | |_IS_| | |_TO_| | |_literal-2_______________| | |
| | |_=_____________| |_arithmetic-expression-2_| | |
| |_condition-name-2____________________________________________________| |
| |
| >__ _imperative-statement-2_ __ ____________ _________________________________________________>< |
| |_NEXT SENTENCE__________| |_END-SEARCH_| |
| |
|__________________________________________________________________________________________________|
|
|
|
Back to top |
|
|
|