Results 1 to 13 of 13
  1. #1
    Join Date
    Sep 2006
    Posts
    97

    Unanswered: I need to force application one bye one as script in Solaries

    In Solaries and DB2 environment

    I need to use in script to force application one by one in a loop

    can you please help me out guys


    Thanks in advance

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Something like this?
    Code:
    db2 list applications | awk 'NR>4 {print "db2 force application(" $3 ")";}' | sh
    Not tested.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Sep 2006
    Posts
    97
    It's working great and thank you

  4. #4
    Join Date
    Sep 2006
    Posts
    97
    db2 "force application(302)"
    db2 "force application()"

    How can Trip the bottom line of that script above

  5. #5
    Join Date
    Sep 2006
    Posts
    97
    By thw way Thanks N_I,

    I chnaged minorchnage

    db2 list applications | awk 'NR>4 {print "db2 \"force application(" $3 ")\"";}'

    But I need to trim extra line in the bottom from given bellow

    db2 "force application(315)"
    db2 "force application(314)"
    db2 "force application(312)"
    db2 "force application()"

  6. #6
    Join Date
    Sep 2006
    Posts
    97
    please some body can help me

  7. #7
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    try awk 'NR>4 && $3 {print "db2 \"force application(" $3 ")\"";}'
    ---
    "It does not work" is not a valid problem statement.

  8. #8
    Join Date
    Sep 2006
    Posts
    97
    thanks Once again

  9. #9
    Join Date
    Sep 2006
    Posts
    97
    db2 list applications | awk 'NR>4 && $3 {print "db2 \"force application(" $3 ")\"";}'

    I am getting syntax error

  10. #10
    Join Date
    Sep 2006
    Posts
    97
    awk: syntax error near line 1
    awk: bailing out near line 1

  11. #11
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    That must be something about your awk implementation; my gawk works fine. Try reading the manual.
    ---
    "It does not work" is not a valid problem statement.

  12. #12
    Join Date
    Jan 2003
    Posts
    1,605
    awk and gawk are not the same application - it can work differently. I always use gawk where possible.

  13. #13
    Join Date
    Sep 2006
    Posts
    97
    it si working in AIX environment


    db2 list applications | awk 'NR>4 && $3 {print "db2 \"force application(" $3 ")\"";}'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •