View Only
  • 1.  TWS - Job Definition Mass Change

    Posted Thu May 25, 2023 12:27 PM

      our SAP instance is going to Google Cloud - we installed TWS agent on the SAP instance and pointed our existing workstation to that address. Looks like we had to create a new user for that agent and not the user tws930 we normally use- so now when i run a job in the existing workstation that is pointed to the cloud - we get internal abend because the user calling the job is wrong ?... i changed the login user to that new user in the job definition and it runs. is there anyway to do a mass change to all the job definitions and change the login user to be the new one. we have 500 jobs :)

    armin pohl

  • 2.  RE: TWS - Job Definition Mass Change

    Posted Fri May 26, 2023 06:50 AM

    As an example, if your existing workstation is called ABC123 you could do the steps below, but always test the procedure first.

    # Create a text file of all jobs defined against workstation ABC123
    composer 'create allABC123Jobs.def from job=ABC123#@'
    # Globally replace all instances of the tws930 user with the value of the new user
    sed s'\STREAMLOGON tws930\STREAMLOGON thenewuser\'g allABC123Jobs.def > allABC123JobsNew.def
    # Use composer to validate the file with the new amended STREAMLOGON user
    composer 'validate allABC123JobsNew.def'
    # Replace the job definition in the database with the ones from the file
    composer 'replace allABC123JobsNew.def'

    Mark Delaney