The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Displaying the data from the select query in a particular format sachin.tendulka Shell Programming and Scripting 15 12-11-2007 08:44 AM
Query in perl Dana Evans UNIX for Dummies Questions & Answers 2 11-21-2007 11:27 PM
sed format query gopsman Shell Programming and Scripting 1 05-15-2007 03:26 AM
perl query bishweshwar Shell Programming and Scripting 1 04-30-2007 10:03 AM
Perl CGI Query pondlife Shell Programming and Scripting 4 06-08-2006 10:28 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-08-2008
King Nothing King Nothing is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 68
Perl Query Regarding format

Hello people.
I have got the following script
QM=ARGV[0];
open (CHS_OUT, "echo 'DISPLAY QSTATUS(SYSTEM.CLUSTER.MY.QUEUE) all'|runmqsc $qm|");
while (<CHS_OUT>)
{
if ( /QUEUE\(/ )
{
$QueueName = ValueParser("QUEUE", 6);
}
if ( /IPPROCS\(/ )
{
$InpProcs = ValueParser("IPPROCS", 8);
#print ("\nInp Procs : $InpProcs");
}
if ( /OPPROCS\(/ )
{
$OutProcs = ValueParser("OPPROCS", 8);
#print ("\nOut Procs : $OutProcs");
}
if ( /CURDEPTH\(/ )
{
$CurDepth = ValueParser("CURDEPTH", 9);
write;
}
}
format STDOUT =
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @>>>> @>>>> @>>>>>>
$QueueName, $InpProcs, $OutProcs, $CurDepth
The problem is that I am getting a warning while running the script:
Use of uninitialized value at test.pl line 113, <CHS_OUT> chunk 73.
Thius error comes a number of times ... but I have printed the values of every variable and found them to be initialized.
Althoug the script is running fine in one server I am not getting the value of OutProcs in another server. Any idea folks?
  #2 (permalink)  
Old 12-08-2008
jyoung jyoung is offline
Registered User
  
 

Join Date: Nov 2001
Location: Flint, MI
Posts: 228
I noticed on this line that the variable QM:
Code:
open (CHS_OUT, "echo 'DISPLAY QSTATUS(SYSTEM.CLUSTER.MY.QUEUE) all'|runmqsc $qm|");
Is lower case, but this line
Code:
QM=ARGV[0];
is is upper case. That could be a problem.
  #3 (permalink)  
Old 12-08-2008
KevinADC KevinADC is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2008
Posts: 731
if that is all supposed to be perl code it looks like should not work. These two lines do not look like perl:

QM=ARGV[0];
open (CHS_OUT, "echo 'DISPLAY QSTATUS(SYSTEM.CLUSTER.MY.QUEUE) all'|runmqsc $qm|");
  #4 (permalink)  
Old 12-09-2008
King Nothing King Nothing is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 68
Sorry bout this ... but the line should look more like:
@JYoung : $qm = $ARGV[0];
@Kevin : It is a perl script that executes a few mq commands ...
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:19 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0