Example: Setting attribute values for a ChangeableResource

One concrete subclass of ChangeableResource is com.ibm.as400.resource.RJob, which represents an iSeries™ job. RJob supports many attribute IDs, each of which you can use to access attribute values. This example sets two attribute values for an RJob:

   // Create an RJob object to refer to a specific job.
   AS400 system = new AS400("MYSYSTEM", "MYUSERID", "MYPASSWORD");
   RJob job = new RJob(system, "AJOBNAME", "AUSERID", "AJOBNUMBER");
   
   // Set the date format attribute value.
   job.setAttributeValue(RJob.DATE_FORMAT, RJob.DATE_FORMAT_JULIAN);

   // Set the country or region ID attribute value.
   job.setAttributeValue(RJob.COUNTRY_ID, RJob.USER_PROFILE);

   // Commit both attribute changes.
   job.commitAttributeChanges();