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

Usage of BINSEARCH PL/I


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rmnfdez

New User


Joined: 02 Mar 2021
Posts: 1
Location: Spain

PostPosted: Tue Mar 02, 2021 8:35 pm
Reply with quote

Hi,

I can't find an example using BINSEARCH in PL/I:

"BINSEARCH performs a binary search of an array for a specified key value by using a simple compare and returns a size_t value."

I would like use it to search a DEC FIXED (3) in the following matrix:

DCL 1 WNUM (100),
5 NUMS DEC FIXED (3) INIT(0);

WNUM is loaded in the same program with ordered values.

Thanks in advance.
Regards.
Back to top
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1009

PostPosted: Tue Mar 02, 2021 8:57 pm
Reply with quote

BINSEARCH is a built-in function, with only two mandatory parameters.

Try to substitute your parameters in accordance with function definition from any PL/I manual. Did you try this? Where is your result? What was wrong?

FYI: one of multiple PL/I manuals - www.ibm.com/support/knowledgecenter/SSY2V3_5.1.0/com.ibm.ent.pl1.zos.doc/lrm.pdf
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 -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Is there a way to determine Clist usa... CLIST & REXX 10
No new posts DB2 group member usage DB2 0
No new posts Any limit on usage of cursors ? DB2 1
No new posts Usage of processor directive and firs... PL/I & Assembler 4
No new posts usage of CASE in WHERE clause DB2 10
Search our Forums:

Back to Top