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

Senior Member


Joined: 29 Apr 2008
Posts: 2011
Location: USA

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 STEM usage in REXX CLIST & REXX 14
No new posts z/OS Modules Usage report using SMF 42 DFSORT/ICETOOL 2
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
No new posts JCL and TAPE drives: how to maximize ... JCL & VSAM 9
No new posts Is there a way to determine Clist usa... CLIST & REXX 10
Search our Forums:

Back to Top