Sponsored Content
Top Forums Shell Programming and Scripting Connect once db disconnect after all execution Post 302832625 by Yoda on Monday 15th of July 2013 10:07:19 AM
Old 07-15-2013
You can define a variable with list of empids separated by comma:
Code:
while IFS="|" read empid skip
do
        [ -z "$qid" ] && qid="$empid" || qid="${qid},${empid}"

done < test_file

And use that in your cursor:
Code:
cursor c1
is select emplid,ACTION,ACTION_DT,ACTION_REASON
from ps_job
where emplid in ('$qid');

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Connect over ssh, start something, disconnect

i'm connecting with ssh from a windows pc to a linux system. i want to start e.g. a download and close my session afterwards. how do i do this without killing the download? thx in advance. (2 Replies)
Discussion started by: sTorm
2 Replies

2. UNIX for Advanced & Expert Users

Force user to disconnect if no activity

Does anybody know how to force a user to automatically logoff a UNIX session if there is no keyboard activity for a period of time? We use COBOL and there is a BEFORE TIME option on the ACCEPT command, however, we do not want to change the many programs we have to detect this. What we really... (3 Replies)
Discussion started by: MarkN
3 Replies

3. Shell Programming and Scripting

after server disconnect ftp tranfer......

Hi, I have a problem for ftp file to server. If the server due to some reason (such as unstable) and disconnect my ftp script. Can the ftp keep automatic retry to connect? If yes, the files can be keep sending to host without duplicate? HOST=hostname USER=happyv PASSWD=happyv exec 4>&1... (2 Replies)
Discussion started by: happyv
2 Replies

4. Shell Programming and Scripting

Is it possible..when ftp session disconnect and it can automatic run again?

Hi, Is is possible when ftp script disconnect by remote server and it can restart to tranfer (such as restart in 10 mins, etc)? Please help!!!! (1 Reply)
Discussion started by: happyv
1 Replies

5. Shell Programming and Scripting

vpn connect/disconnect shell script

Hi I am not so good in scripting..trying ot learn it...need guidance of the experts in shell scripting.. Let me explain the scenario first.. a server MX1 is connected to another server MX2 through vpn..every 5 minute a script runs to test vpn connectivity between the 2 servers.when the vpn... (12 Replies)
Discussion started by: renuka
12 Replies

6. UNIX for Advanced & Expert Users

Extract Oracle DB Connect and SQL execution log

Hi, I am trying to write a generic script as a part of a framework which will establish Oracle DB connection once and loops in to check for some files which gives the SQL statements to execute. The script is running but I am stuck with capturing errors ( ORA and SP) and outputs. Example: ... (4 Replies)
Discussion started by: mirage0809
4 Replies

7. Shell Programming and Scripting

In real time - what user connects or disconnect

Write a tool that will be displayed in real time, what user connects or disconnects from a system that uses this tool :)) Maybe anyone can help me? (2 Replies)
Discussion started by: titasas
2 Replies

8. Shell Programming and Scripting

Disconnect scripts

I think I read that by entering "disconnect <script_name>" somewhere in pppd, that when ppp connection is lost that the named script will be executed. I also see that something similar can be (if I read correctly) in ip-down. Which is correct or are both correct. I want to set off the system... (5 Replies)
Discussion started by: slak0
5 Replies

9. UNIX for Dummies Questions & Answers

How to disconnect telnet prompt with port no in script.

Hi Gurus, I am trying to write a script for checking the status of linux servers by connecting via telnet with port no but to terminate i have to manually type "quit" .how can i terminate the telnet session in script itself.For E.g ========================================= telnet ipaddress... (3 Replies)
Discussion started by: kapil514
3 Replies

10. Shell Programming and Scripting

Trigger the execution of a script on SFTP Disconnect

Hi Guys, I suspect what I'm trying to do isn't possible, but I'm hoping someone can either confirm this or point me in the right direction. We have a third-party application which transfers a collection of files to our SFTP server ( Ubuntu 12.04 with OpenSSH ) . Once the app disconnects, we... (13 Replies)
Discussion started by: jamesdrinkwater
13 Replies
OPEN(5) 							File Formats Manual							   OPEN(5)

NAME
open, create - prepare a fid for I/O on an existing or new file SYNOPSIS
Topen tag[2] fid[2] mode[1] Ropen tag[2] fid[2] qid[8] Tcreate tag[2] fid[2] name[28] perm[4] mode[1] Rcreate tag[2] fid[2] qid[8] DESCRIPTION
The open request asks the file server to check permissions and prepare a fid for I/O with subsequent read and write messages. The mode field determines the type of I/O: 0, 1, 2, and 3 mean read access, write access, read and write access, and execute access, to be checked against the permissions for the file. In addition, if mode has the OTRUNC (0x10) bit set, the file is to be truncated, which requires write permission (if the file is append-only, and permission is granted, the open succeeds but the file will not be truncated); if the mode has the ORCLOSE (0x40) bit set, the file is to be removed when the fid is clunked, which requires permission to remove the file from its directory. If other bits are set in mode they will be ignored. It is illegal to write a directory, truncate it, or attempt to remove it on close. If the file is marked for exclusive use (see stat(5)), only one client can have the file open at any time. That is, after such a file has been opened, no other open will succeed until fid has been clunked. All these permissions are checked at the time of the open request; subsequent changes to the permissions of files do not affect the ability to read, write, or remove an open file. The create request asks the file server to create a new file with the name supplied, in the directory (dir) represented by fid, and requires write permission in the directory. The owner of the file is the implied user id of the request, the group of the file is the same as dir, and the permissions are the value of (perm&(~0777|0111)) | (dir.perm&perm&0666) if a regular file is being created and (perm&~0777) | (dir.perm&perm&0777) if a directory is being created. This means, for example, that if the create allows read permission to others, but the containing direc- tory does not, then the created file will not allow others to read the file. Finally, the newly created file is opened according to mode, and fid will represent the newly opened file. Mode is not checked against the permissions in perm. The qid for the new file is returned with the create reply message. Directories are created by setting the CHDIR bit (0x80000000) in the perm. The names . and .. are special; it is illegal to create files with these names. It is an error for either of these messages if the fid is already the product of a successful open or create message. An attempt to create a file in a directory where the given name already exists will be rejected; in this case, the create system call (see open(2)) uses open with truncation. The algorithm used by create is: first walk to the directory to contain the file. If that fails, return an error. Next walk to the specified file. If the walk succeeds, send a request to open and truncate the file and return the result, successful or not. If the walk fails, send a create message. If that fails, it may be because the file was created by another process after the previous walk failed, so (once) try the walk and open again. For the behavior of create on a union directory, see bind(2). ENTRY POINTS
Open and create both generate open messages; only create generates a create message. OPEN(5)
All times are GMT -4. The time now is 06:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy