Sponsored Content
Top Forums Shell Programming and Scripting How to use GOTO stmt in Unix scripting? Post 302680805 by Corona688 on Thursday 2nd of August 2012 10:37:41 AM
Old 08-02-2012
What you want sounds like continue. That will jump it back up to the top of the while loop and execute its conditional statement again.
This User Gave Thanks to Corona688 For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unix version of gosub or goto??

Is there a Unix (Solaris v8 ksh) version of the old basic command gosub or goto? I've researched the return command, but can't identify the command to return from. I am not trying to return from a function. Can someone give me a basic understanding of this please? Thanks so much in advance for... (3 Replies)
Discussion started by: gozer13
3 Replies

2. UNIX for Dummies Questions & Answers

Please explain the stmt

hi, Please explain the below stmt. P=1234 var1=:/a/b/c/file.dat printf "%s %s\n" "$" "${var1#?}" Output is: 1234 /a/b/c/file.dat What is #? in printf stmt? by using that the first character( : ) of "var1" variable is not displayed in output. How is that? please explain.. ... (1 Reply)
Discussion started by: srilaxmi
1 Replies

3. Shell Programming and Scripting

Help with awk stmt

Hi All, I have a log file as: cat error.log.tmp1 2010-07-06 23:18:34 Connection Available to xyztestftp.abc.com.my 2010-07-06 23:20:33 Connection Available to xyztestftp.abc.com.my ERROR FTP LOGIN Now I am reading this complete log file if no single occurrence of word "ERROR" (this word... (5 Replies)
Discussion started by: ss_ss
5 Replies

4. Shell Programming and Scripting

I want to get the Unix variable value in the sql stmt

Hi All I have a requirement where in I am stuck. There is a shell script that is being developed by me. It consist of the sql stmt also. I need to export a variable called HOMEPAGE with a value say www.abc.com. and then use this $HOMEPAGE variable in the sql stmt. My ultimate aim is to fetch all... (1 Reply)
Discussion started by: amitsinha
1 Replies

5. Shell Programming and Scripting

Help with Dates and SQl stmt?

hi All Please explain the below statement in RED?What does this mean? perl /HDS/common/operations/Quality_Team/Nirvana/WEEKLY_OOPS/sql_dump.pl --sql "select * from WEEKLY_REPORT order by test_case, type" --username=ddb_qa --password=ddb_qa123 --sid=pldeldb --output... (1 Reply)
Discussion started by: SVS_2017
1 Replies

6. Shell Programming and Scripting

Case Stmt - Need Help Urgently

Hello All, Need help urgently.. i have a scenario where i have two files 1) mireport_20111406.txt 2) PRLIHSP01_8080.2011-06-11-15_26_31 ---------- I want a query something similar to this algorithm :- Case when file_name is like mireport then extract_date=14-06-2011 when... (4 Replies)
Discussion started by: iamnoone
4 Replies

7. Shell Programming and Scripting

"goto" like command in UNIX

Hi, echo "yes or no?" read ans case $ans in *) echo "yes" ;; *) echo "no" ;; *) echo "yes or no only" #here, if the answer is not "Y" or "N", I want to go back to asking "yes or no?" (9 Replies)
Discussion started by: erin00
9 Replies

8. Shell Programming and Scripting

Goto - UNIX v6 Manual Questions

Hey :) I am trying to understand the command goto. I have some questions regarding the goto manual. 1.What does the underlined part mean? I'm not allowed to type goto in the shell? But if goto is written into a file everything is okay? 2.So if a part of my file looks like this ... goto... (8 Replies)
Discussion started by: orbit
8 Replies

9. Shell Programming and Scripting

A dash to GOTO or a dash from GOTO, that is the question...

Well, guys I saw a question about GOTO for Python. So this gave me the inspiration to attempt a GOTO function for 'dash', (bash and ksh too). Machine: MBP OSX 10.14.3, default bash terminal, calling '#!/usr/local/bin/dash'... This is purely a fun project to see if it is possible in PURE... (3 Replies)
Discussion started by: wisecracker
3 Replies
MAXDB_STMT_ERRNO(3)							 1						       MAXDB_STMT_ERRNO(3)

maxdb_stmt_errno - Returns the error code for the most recent statement call

       Procedural style

SYNOPSIS
int maxdb_stmt_errno (resource $stmt) DESCRIPTION
Object oriented style int$maxdb_stmt->errno () For the statement specified by stmt, maxdb_stmt_errno(3) returns the error code for the most recently invoked statement function that can succeed or fail. Note For possible error codes see documentation of SQLDBC: http://maxdb.sap.com/documentation/. RETURN VALUES
An error code value. Zero means no error occurred. EXAMPLES
Example #1 Object oriented style <?php /* Open a connection */ $maxdb = new maxdb("localhost", "MONA", "RED", "DEMODB"); /* check connection */ if (maxdb_connect_errno()) { printf("Connect failed: %s ", maxdb_connect_error()); exit(); } $maxdb->query("CREATE TABLE temp.mycity LIKE hotel.city"); $maxdb->query("INSERT INTO temp.mycity SELECT * FROM hotel.city"); $query = "SELECT name, zip FROM temp.mycity ORDER BY name"; if ($stmt = $maxdb->prepare($query)) { /* drop table */ $maxdb->query("DROP TABLE temp.mycity"); /* execute query */ $stmt->execute(); printf("Error: %d. ", $stmt->errno); /* close statement */ $stmt->close(); } /* close connection */ $maxdb->close(); ?> Example #2 Procedural style <?php /* Open a connection */ $link = maxdb_connect("localhost", "MONA", "RED", "DEMODB"); /* check connection */ if (maxdb_connect_errno()) { printf("Connect failed: %s ", maxdb_connect_error()); exit(); } maxdb_query($link, "CREATE TABLE temp.mycity LIKE hotel.city"); maxdb_query($link, "INSERT INTO temp.mycity SELECT * FROM hotel.city"); $query = "SELECT name, zip FROM temp.mycity ORDER BY name"; if ($stmt = maxdb_prepare($link, $query)) { /* drop table */ maxdb_query($link, "DROP TABLE temp.mycity"); /* execute query */ maxdb_stmt_execute($stmt); printf("Error: %d. ", maxdb_stmt_errno($stmt)); /* close statement */ maxdb_stmt_close($stmt); } /* close connection */ maxdb_close($link); ?> The above example will output something similar to: Warning: maxdb_stmt_execute(): -4004 POS(23) Unknown table name:MYCITY [42000] <...> Error: -4004. SEE ALSO
maxdb_stmt_error(3), maxdb_stmt_sqlstate(3). PHP Documentation Group MAXDB_STMT_ERRNO(3)
All times are GMT -4. The time now is 06:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy