Sponsored Content
Full Discussion: Perl Query Regarding format
Top Forums Shell Programming and Scripting Perl Query Regarding format Post 302265759 by King Nothing on Monday 8th of December 2008 12:32:32 PM
Old 12-08-2008
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? Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed format query

hi how to do the following. If the input is ACCOUNT= 400 QT = 65 CAPT =85 NT = 5 the output should be ACCOUNT= 40 QT = 15 CAPT =37 NT = 90 I want the corresponding values to be changed to new values. hlp (1 Reply)
Discussion started by: gopsman
1 Replies

2. Shell Programming and Scripting

Displaying the data from the select query in a particular format

Hi, I have a shell script that returns 10 records for the column Name and age from a select query. Where when i store those data in retrieve_list.txt file i need to store the data in a particular format like:- $Jason$30 $Bill$23 $Roshan$25 Here is my script: 1)... (15 Replies)
Discussion started by: sachin.tendulka
15 Replies

3. Shell Programming and Scripting

How to Format the result driven from a SQL Query

Hi All, I want to format the result driven from the query into neat format. For example pls find the below code, #! /bin/sh result=' sqlplus -s uname/passwrd@DBname select no,name,address,ph_no, passport_no,salary,designation from emp_table where salary>1000; exit EOF' ... (8 Replies)
Discussion started by: little_wonder
8 Replies

4. Shell Programming and Scripting

Convertion of Date Format using SQL query in a shell script

When I write Select date_field from TableA fetch first row only I am getting the output as 09/25/2009. I want to get the output in the below format 2009-09-25 i.e., MM-DD-YYYY. Please help (7 Replies)
Discussion started by: dinesh1985
7 Replies

5. Shell Programming and Scripting

Need help getting my output from MYSQL query into right format

Good afternoon! I have been lurking in this forum for awhile now. I have just recently started posting. I think this is a really good site. With that being said, I don't like to just run and get an answer before I try my best first. I have poured some blood, sweat and tears into... (4 Replies)
Discussion started by: brianjb
4 Replies

6. Shell Programming and Scripting

perl module to convert xlsx format to xls format

Hi Folks, I have written a perl script that reads data from excel sheet(.xls) using Spreadsheet::ParseExcel module. But the problem is this module doesn't work for excel sheets with extension .xlsx. I have gone through Spreadsheet::XLSX module with which we can read from .xlsx file directly.... (1 Reply)
Discussion started by: giridhar276
1 Replies

7. Shell Programming and Scripting

From sql Insert Query to XML format

Hi How do I translate Let say Cat inserts.sql gives Insert into PM9_TAXATION_ROUNDING (STATE_GECODE, TAX_TYPE, TAX_AUTHORITY, SYS_CREATION_DATE, SYS_UPDATE_DATE, APPLICATION_ID, DL_SERVICE_CODE, ROUNDING_METHOD) Values ('xx', 'xx', 'x', TO_DATE('10/26/2012 13:01:20',... (3 Replies)
Discussion started by: anuj87in
3 Replies

8. Shell Programming and Scripting

Mailing query results in tabular format

Hi , I am purging two tables based on date. In my script I am taking the count of the tables purging them and then taking the after counts. I need to mail the before and after counts of the two tables in a mail in table format as mentioned in the result section. For Eg: ## Count of the... (14 Replies)
Discussion started by: CFA
14 Replies

9. Programming

Sybase ASE: Query to find correct format issue.

Hi Team , I am new to Sybase Adaptive Server Enterprise/15.7 (ASE) and need some guidance to find the different values in serial format column. SELECT DISTINCT SERIAL_FORMAT FROM PRODUCTS It has values with below format which contains 12 digits hexadecimal characters with... (2 Replies)
Discussion started by: Perlbaby
2 Replies

10. Shell Programming and Scripting

How to create a file from output of vertica table query in UTF-8 format?

Hello, In my shell script, I extract table data from HP Vertica DB into a csv file using vsql -c command. But the problem is the file getting created is in binary format and hence some of the data becomes unreadable which has chinese characters as part of data. file -i filename.csv - gives... (2 Replies)
Discussion started by: Dharmatheja
2 Replies
Query(3pm)						User Contributed Perl Documentation						Query(3pm)

NAME
CGI::Application::Plugin::DevPopup::Query - show CGI query in DevPopup window SYNOPSIS
use CGI::Application::Plugin::DevPopup; use CGI::Application::Plugin::DevPopup::Query; The rest of your application follows ... DESCRIPTION
This module is a plugin for CGI::Application::Plugin::DevPopup. Whenever used, it creates two sections in the DevPopup output. First section, "Current Run Mode", shows name of run mode executed. Second section, "CGI Query", contains a list of CGI query parameters and associated values passed to your CGI::Application. See "query()" in CGI::Application and CGI.pm for more information about query parameters. VERSION
1.03 SUBROUTINES
/METHODS No public methods for this module exist. DEPENDENCIES
CGI::Application::Plugin::DevPopup CONFIGURATION AND ENVIRONMENT
N/A DIAGNOSTICS
N/A SEE ALSO
CGI::Application::Plugin::DevPopup, CGI::Application INCOMPATIBILITIES
Not known. BUGS AND LIMITATIONS
Not known. AUTHOR
Serguei Trouchelle, <mailto:stro@cpan.org> Most of code is based by CGI::Application::Plugin::DevPopup by Rhesa Rozendaal, <mailto:rhesa@cpan.org> LICENSE AND COPYRIGHT
This module is distributed under the same terms as Perl itself. Copyright (c) 2009-2011 Serguei Trouchelle perl v5.12.4 2011-11-01 Query(3pm)
All times are GMT -4. The time now is 06:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy