adding a new field

I need to add a new field to an existing file. The specs state that it is a descriptor (D). I know to add a regular new field I would use ADADBM, but the book says to give it a descriptor status I need to use ADAINV. Do I add the new field using ADADBM then use ADAINV to make it a descriptor (D)?

I don’t work with the database very often and the former DBA didn’t leave any notes on how to perform this task.

Thank you.

Yes, that’s exactly the sequence

  • ADADBM ADD_FIELDS
  • ADAINV INVERT

I thought so. Thanks for the quick reply.

Andrea

If your new field is to be defined with NU or NC option, you can also add the field as descriptor without ADAINV, e.g.:
adadbm db=33 add_fields=21 1,xx,32,a,nu,de end_of_fields

Wolfgang

We are about to make this change in our production environment. Do I have to have the file exclusively to add this field? Or, can I add the field while users are using the file?

Thank you.

Does anybody know if I can make this change while the file is being used or do I need it exclusively? It is a 24/7 system so if I need it exclusively, I have to try to schedule a downtime.

Thank you.

Andrea,

I had exactly the same problem two days ago.
I needed to add the field in Production and kept getting error messages from executing ADADBM with response code 3048 File / UserID not available at open time.
I waited and did it later in the evening without any problems and without bringing system down.

Thanks
Yelena

you would need the file exclusively while the utility runs, which is why Yelena was getting response code 48’s until the file was available to be locked.