Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. markmulligansr

    PureData (a.k.a. Netezza, PostgreSQL) ERROR parsing problem

    If anyone has the time to read this problem statement and can tell me how to use Perl to read the input records, write them as is and then read those to then format the output as shown below, I would really appreciate it. We have a lot of business users spending a lot of time trying to solve...
  2. markmulligansr

    How to parse data from a record with fixed data up to a point and then variable length information.

    This is a Perl how do I do this question. 10622 2014-04-18 04:14:18.924064 EDT 10622 DEBUG: QUERY: insert into "EDWP06".ETL_STG.RQ_DRVR_UPDT next_data... here is my input data. It is fixed positions up to the "EDWP06".ETL_STG.RQ_DRVR_UPDT how do I extract the EDWP06, ETL_STG and RQ_DRVR_UPDT...
  3. markmulligansr

    How can I design a script to push or pull results from commands run on one server to another?

    The other database is DB2 LUW so the ORACLE information is not relevant at this time but we do have ORACLE databases and at some point in the future may need to load information from these sources so this is very helpful information that I may well need in the future. Thank you so much. Yes...
  4. markmulligansr

    How can I design a script to push or pull results from commands run on one server to another?

    Netezza does not support access to remote databases like ORACLE and other databases do. It is not as sophisticated as a lot of the other relational databases in this respect. I am trying to find a way to migrate data to it without having to land the data in files. We do not have the storage...
  5. markmulligansr

    How can I design a script to push or pull results from commands run on one server to another?

    For example, is there a way I push the results from a script run on a local server into a script on a remote server that does something with the results without having to land the results on disk? Or is there a way I can pull the results from a script/command run on a remote server into a...
  6. markmulligansr

    How do I write a KSH script to run programs in parallel?

    How do I write a KSH script to run programs in parallel? I'd like to pass the script a variable with the number of programs I'd like to run in parallel. If for example, I have an input file with 100 table names and if I want to run a runstats program for 10 tables at a time in parallel with no...
  7. markmulligansr

    Spawning back ground scripts and checking their return code question

    I remember that I can spawn another script is back ground by using the . backgroundscript & option and then the wait statement. Is there a way I can spawn multiple background scripts and then wait for all of them to finish and be able to check the return code from each? If so, I would...
  8. markmulligansr

    How do I get the end of next month date and deal with leap years.

    Thanks. I found this code and it works for the end of year and leap year scenarios. function pn_month { typeset ym=$1 pn=$2 (( m = ym % 100 )) (( y = ym / 100 )) while (( pn != 0 )); do if (( pn > 0 )); then if (( m == 12 )) then (( m = 1 )); (( y = y + 1 )) else (( m = m + 1 ))...
  9. markmulligansr

    How do I get the end of next month date and deal with leap years.

    How do I get the end of next month's date and deal with end of year and February during leap years? Is there a UNIX command that returns this or do I have to develop some sort of script logic using the date command. The requirements I have are, given today's date, what is the end of next...
  10. markmulligansr

    How do I get sed to use variable values?

    I have this statement that uses sed echo $tabname | sed 's/\_NEW/\_"${Month}"\_${Day}\_${Year}\_OLD/g' | read oldtabnamesuffix The value of oldtabnamesuffix is tablename_${Month}_${Day}_${Year}_OLD after this statement executes. Hoe do I get sed to use the variable values? For example, I'd...
  11. markmulligansr

    How do I create numeric variables with decimals and divide these?

    Sam's code worked great. Someone also told me about changing ksh to ksh93 and the simple divide I had in my code came up with the correct answer too. Thanks Sam
  12. markmulligansr

    How do I create numeric variables with decimals and divide these?

    How do I put the first two numbers in numeric variables and divide the first by the second to get the third number displayed below in a KORN shell script? 2.322359 5.864941 0.395973 ( 2.322359 / 5.864941 ) = 0.395973 Thanks, Mark
  13. markmulligansr

    How do I get the hdisks into an array without the first two fields?

    Thank you very much. This got me on track. I am using KORN shell scripts and the information is on one line. It was in a file that I had read into a variable called $line and so I was able to use this statement to accomplish what was needed. set -A diskarray $(echo ${line} | sed 's/.*Busy...
  14. markmulligansr

    How do I get the hdisks into an array without the first two fields?

    If I have a record like the one shown below, how do I get the hdisk values into an array without the DISKBURY and Disk %Busy edwasu values? I am thinking that I could pipe the record to sed and replace the blanks with _ and then pipe that to sed and change the commas to blanks and have this be...
  15. markmulligansr

    DB2 Backup Environment Script as part of a Disaster Recovery Plan

    Mark Mulligan – (mark.mulligan.sr@sbcglobal.net) DB2 DBA 01 November 2008 A critical part of any database disaster recovery plan is to make sure that the environment surrounding the database is the way it was before the disaster in order to provide the same level of performance and level of...
  16. markmulligansr

    Should I use a do loop and an array?

    Backup started at 2008092210050100000 0000 The BACKUP DATABASE command completed successfully. 0001 The BACKUP DATABASE command completed successfully. 0002 The BACKUP DATABASE command completed successfully. 0003 The BACKUP DATABASE command completed successfully. 0004 The BACKUP DATABASE...
  17. markmulligansr

    How do I parse out each path from this variable?

    If I have a variable with the values shown below, how do I parse out each path from this variable? The variable will have any where from 1 to n paths. I need to parse through and change directories to each path and perform some work. I know how to do the work but not how to parse this...

Part and Inventory Search

Back
Top