Powerbuilder (PowerScript) command that is equivalent to VB's Instr command

I'm looking for a Powerbuilder (PowerScript) command that is
equivalent to VB's Instr command.

I need to use it in the below process that I'm converting
from VB to PB.  Thanks very much for any help!

Private Sub Form_Load ()
   Buffer$ = Buffer$ & MSComm1.Input
   Loop Until InStr(Buffer$, "OK" & vbCRLF)
   ' Read the "OK" response data in the serial port.
   ' Close the serial port.
   MSComm1.PortOpen = False
End Sub
10/22/2004 7:13:43 PM
sybase.powerbuilder.general 62418 articles. 18 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 33

How about Pos?

Evita Chapa
Senior Systems Analyst II
Command Technologies, Inc.

Finds one string within another string.
Pos   A separate function provides an alternative syntax for DBCS


Pos ( string1, string2 {, start } )

Argument Description
string1 The string in which you want to find string2.
string2 The string you want to find in string1.
 (optional) A long indicating where the search will begin in string1. The
default is 1.
Return value

Long. Returns a long whose value is the starting position of the first
occurrence of string2 in string1 after the position specified in start. If
string2 is not found in string1 or if start is not within string1, Pos
returns 0. If any argument's value is NULL, Pos returns NULL.
<Jim Smith> wrote in message news:41795be7.1848.1681692777@sybase.com...
> I'm looking for a Powerbuilder (PowerScript) command that is
> equivalent to VB's Instr command.
> I need to use it in the below process that I'm converting
> from VB to PB.  Thanks very much for any help!
> Private Sub Form_Load ()
> ...
>    Do
>       DoEvents
>    Buffer$ = Buffer$ & MSComm1.Input
>    Loop Until InStr(Buffer$, "OK" & vbCRLF)
>    ' Read the "OK" response data in the serial port.
>    ' Close the serial port.
>    MSComm1.PortOpen = False
> End Sub

10/22/2004 7:40:12 PM
A good question for the powerbuilder.powerscript section.

On 22 Oct 2004 12:13:43 -0700, Jim Smith wrote:

>I'm looking for a Powerbuilder (PowerScript) command that is
>equivalent to VB's Instr command.
>I need to use it in the below process that I'm converting
>from VB to PB.  Thanks very much for any help!
>Private Sub Form_Load ()
>   Do
>      DoEvents
>   Buffer$ = Buffer$ & MSComm1.Input
>   Loop Until InStr(Buffer$, "OK" & vbCRLF)
>   ' Read the "OK" response data in the serial port.
>   ' Close the serial port.
>   MSComm1.PortOpen = False
>End Sub

Bruce Armstrong [TeamSybase]

TeamSybase blogs:

Two 3rd party books on developing with PowerBuilder

Need code sample?  Check out CodeXchange:

Preach the gospel at all times. If necessary, use words. - Francis of Assisi


If you are using Google to post messages to the newsgroups, you will
*not* receive a reply.  Messages posted through Google never reach the
Sybase newsgroup server, so we don't see them in order to respond to
them.  You should post your question using a standard newsgroup reader 
or the web based newsreaders at my.sybase.com or www.pfcguide.com.  
Google is great for searching the Sybase newsgroups, but you can't post
to them from there.


This newsgroup message is only intended for the recipient. Given that it
is a posting to a public newsgroup, that means if you can read this
message then you are the recipient.  This message may contain information
that is confidential and protected from disclosure. And then again, 
it may not.

Given that TeamSybase members are not employees of Sybase, the contents 
of this message do not necessarily represent the views or policies of 
Sybase.  Given that TeamSybase is a diverse group of users of Sybase
products, the contents of this message do not necessarily represent the 
views of a significant number of the members of TeamSybase.  Given that the
author has multiple personalities and hears voices in his head, the contents 
of this message do not necessarily represent his own views.
10/23/2004 5:47:24 AM

Similar Artilces:

OLE Control
I'm attempting to load a .bmp image into an OLE object using PowerBuilder 11.1. The OLE ActiveX is AddFlow5 and I am using it to graphically represent links between entities - people, organisations, addresses, vehicles, telephones, etc. Documentation for AddFlow5 gives an example in VB script to load the relevant 'picture' into a node, ie, SET node.picture = LOADPICTURE("C:\images\person.bmp"). I cannot find a suitable equivalent in PB 11 to either 'SET' or to 'LOADPICTURE' The developer of AddFlow suggested I try: OLEObject uo uo = C...

SPLIT function in VB what's in POWERBUILDER ?
Hi All, I'm having trouble finding function SPLIT that exists in VB, what is in the PB9? Maybe someone could help ... Tq Thanks but I'm not using PFC, is there another way to do split in PB9? .... "JK" <keese.john@jobcorps.org> wrote in message news:1169829008.591189.268780@l53g2000cwa.googlegroups.com... > If your using a version of PB with access to the PFC, there an object > n_cst_string that has a function called of_ParseToArray() > > --John > > On Jan 26, 9:30 am, "ekologi" <e...@cbn.net.id> wrote: >> ...

Using PowerBuilder's or Infomaker's Query Painter in my applicatoin
I am at the point in my application where I would like to allow my users to create customized queries, and possibly reports. I have figured out how to use syntaxfromsql to convert sql to the special datawindow code, and this works find for me. But some of my users arn't as gifted in the sql department. So now I wish I had a nice GUI query builder. My question is; Is the query painter, and maybe even the datawindow painter accessable from Powerbuilder script kind of like an activeX? Or an object that I can drop into a window. I think I am to the point that I could recreate th...

New command syntax for 'x' command
'x EXPRESSION' is the same, unless EXPRESSION begins with \d+\s+. 'x NNN EXPRESSION' means to rump out the value of EXPRESSION as usual, but to limit the depth of the dumping recursion to at most NNN levels. --- pod/perldebug.pod 2002/02/13 01:35:14 1.2 +++ pod/perldebug.pod 2002/02/13 01:38:29 @@ -78,7 +78,7 @@ The C<DB::OUT> filehandle is opened to F</dev/tty>, regardless of where STDOUT may be redirected to. -=item x expr +=item x [maxdepth] expr Evaluates its expression in list context and dumps out the result in a pretty-printed fashi...

One PowerBuilder app triggering an event on another PowerBuilder app's Frame
Running 2 concurrent PowerBuilder apps (both MDI). Is there a way to trigger a user event on the frame of one of the apps from the other? I can get a handle to the frame window, and I am guessing that a Send() of some kind would do the trick, but I don't know which parameters to use or where the parameters for the Send() are documented. Thanks for the help. I recently had the same situation. You can use send or post to send a message to a window in another application. First you need the handle of the window you are sending the message to. Since it is in another applica...

Javascript eqivalent of VB's TRIM command
Hi,VB has the trim command to remove unwanted spaces from the bigging and end of a string.Does anyone know of an equivalent command in Javascript?Much appreciated.Regards,Graham. JavaScript does not have one built in so here are some functions that do it:String.prototype.trim=function(){    return this.replace(/^\s*|\s*$/g,'');} String.prototype.ltrim=function(){    return this.replace(/^\s*/g,'');} String.prototype.rtrim=function(){    return this.replace(/\s*$/g,'');}You then just call it like this:var strEww = "     ...

data view's filter vs. data adapter's SELECT command
doing objectDataSet.Tables["TableA"].DefaultView.RowFilter = "TableA_ID=" + dropDownListControl.SelectedItem.Value.ToString(); or objectDataAdapter.SelectCommand.CommandText = "SELECT * FROM TableA " + " WHERE TableA_ID =" + dropDownListControl.SelectedItem.Value.ToString(); i thought both statements should represent the same thing, but the second one gave me a System.NullReferenceException: Object reference not set to an instance of an object error - would be possible just with those pieces of code ...

XP's Little-Known 'Rebuild' Command
It usually takes a lot to stop XP in its tracks. Even in those rare cases when the operating system is badly damaged, you'll usually at least have the option of booting into the "Last Known Good" configuration, or to Safe Mode. But sometimes, especially after major hardware failures or part swaps (e.g. moving the operating system to a new hard drive), or after problems with dual- or multi-booting software, you may encounter seemingly intractable errors such as "Missing or corrupt HAL.DLL," "Invalid Boot.Ini," or "Windows could not start..." ...

'cvs remove' or equivalent command
Greetings. Does anyone know of a pkg that contains a cvs remove type module? I'm currently using Cvs.pm, it suits my needs, but it doesn't contain functionality to cvs remove a single file. Regards. John ...

easy question -> C# version of VB's left command?
I want to return only the dd/mm/yyyy of a datetime value from a SQL Server SELECT statement... so, I either want to use a LEFT - type? command that limits how many characters or I want to force C# to only display the date without the time .......  thoughts?   Once you've got it as a DateTime object, you should just use String.Format with a format string that matches the sort of output that you want to see. You can do it either from yor SELECt statement or in your aspx page(or code behind). In your SQL: SELECT CONVERT(VARCHAR(10),dob,101) as dateOnly In your page, ...

Using command window's "open" or "of" command causes files in solution explorer to disappear
Whenever I use the "open" or "of" command in the command window (or even in the search text box), any files within folders inside of my web projects I have loaded in my solution explorer will vanish.  This requires me to manually refresh each of the web projects in order for those files to reappear.  This is extremely annoying and defeats the whole purpose of the "open" / "of" shortcuts because once the file disappears, intellisense is unable to locate it until I hit refresh.  Has anybody else encountered this strange bug?...

Perl equivalent to the unix 'cut' command
Howdy list, Subject speaks for itself.. Need to find a function or module to work = like the 'cut' command. I have a file with multiple fields and i need to = 'cut' out 2 of the fields. Looked thru CPAN for cut, but didnt find = anything, started looking thru CPAN searching on 'File' but I think I'm = just not thinking of the right keyword that perl uses. I'm still new to = perl and I'm sorry for my ignorance if it should be right under my nose Thanks in advance, Dave Kettmann NetLogic On Thu, 14 Oct 2004, Dave Kettmann wrote: > Subjec...

RD Command in Powerbuilder
Hello, I am trying to delete a folder by using the RD command through powerbuilder code. when i use the command with msdos it works fine, but when i use it in the powerbuilder script it does not work. i managed using the XCOPY command work in powerbuilder script but no the RD. the code is the following: code in powerbuilder to delete the contents of folder 319 (does not work) run("RD "+'"'+C:\Trax\test\319+'\"'+ " /S") code in msdos to delete the contents of folder 319 (works fine) RD C:\Trax\test\325 /S >run("RD ...

ESC command in powerbuilder
Friends, Please help me to solve this problem. I am writing a program which uses epson printer. I want to convert these following c++ codes to powerbuilder. CString CRLF = "\n"; CString ESC = "\x1b"; m_pMainWnd->m_ptr1.TransactionPrint(PTR_S_RECEIPT, PTR_TP_TRANSACTION); /* /* output the data to printer */ m_pMainWnd->m_ptr1.PrintNormal(PTR_S_RECEIPT, ESC + "|1B"); m_pMainWnd->m_ptr1.PrintNormal(PTR_S_RECEIPT, ESC + "|rATEL (02)1234-5678" + CRLF + CRLF + CRLF); m_pMainWnd->m_ptr1.PrintNormal(PTR_S_RECEIPT, ESC + "|tL...

Web resources about - Powerbuilder (PowerScript) command that is equivalent to VB's Instr command - sybase.powerbuilder.general

PowerBuilder - Wikipedia, the free encyclopedia
PowerBuilder is an integrated development environment owned by Sybase , a division of SAP . It has been in use since 1991, peaking around 1998 ...

Sybase PowerBuilder tool readied for Microsoft's .Net
... Win32 or newer style .Net development After several years of work, Sybase is ready to deliver on the final step in its plan to move PowerBuilder ...

Jim O'Neil (@jimoneil) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Open Directory - Computers: Programming: Languages
about dmoz - dmoz blog - report abuse/spam - help the entire directory only in Programming/Languages Description Top : Computers : Programming ...

The HP Booth Staff (Goons) Owe Me an Apology
... when you might need to use it. For instance, when I was in the WinRunner world there were plugins for driving terminal emulators and powerbuilder ...

Contact Us - Sybase Inc
Thanks for visiting the 主页 section of Sybase.com. Here you will find information about Contact Us. For more information about Business Intelligence, ...

热门搜索 - 我的异常网
... 我的异常网 » 热门搜索 sdpnet2 移动【A111】其它用户原因鉴权失败,是什么意思啊 http:// 本网站服务器位于美国,受美国法律保护 MiniUI js 破解 powerbuilder ...

Mobile app security: Always keep the back door locked
The best way to keep mobile apps safe is to secure the services they connect to.

10 Tech Skills That Will Instantly Net You A $100,000+ Salary
... that let's developers run Java applications. Java is highly popular language for writing web apps and custom enterprise apps. No. 8: PowerBuilder ...

Top Ranked Articles
Top Ranked Articles - Free source code and tutorials for Software developers and Architects.; Updated: 23 Feb 2013

Resources last updated: 1/10/2016 9:38:09 PM