todsn overwrites DCB parameters on old datasets

General discussion of the Co:Z Toolkit
Post Reply
Jeno
Posts: 23
Joined: Wed Oct 03, 2007 5:28 am

todsn overwrites DCB parameters on old datasets

Post by Jeno »

Hello,

just noticed that instead of using existing DCB parameters on old datasets, todsn still overwrites with his defaults if no dcb parameters explicitly specified. In contrast, /bin/cp leaves existing DCB parameters intact when overwritting.

Thank you very much in advance
Best regards Jenö
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

This is the default behavior of fopen. If you want to use the existing DCB characteristics, you can add the fopen option -o 'recfm=*'.

Do you think that this should be the default if no other fopen options are specified?
Jeno
Posts: 23
Joined: Wed Oct 03, 2007 5:28 am

Post by Jeno »

Well, IMHO it would be better to keep existing attributes. With existing datasets, I never expected such behaviour (admitting I am no C programmer ;) ), that's why I checked with /bin/cp. Furthermore, I see no advantage of forcing the default overwrite existing. Anyway, I am afraid I would forget to specify this extra parameter all over again. And, as I asked my collegaues (we are quite aged, you know ;) ) - no one ever heard about this parameter before.

Thank you for the quick assistance.
Have a nice week-end - Jenö
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

I agree with you - the behavior of the C library is strange with respect to merging DCBs. We will look at making "recfm=*" the default.
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

We have changed the todsn command per your suggestions.
Thanks for your input.

See: http://www.dovetail.com/forum/viewtopic.php?t=695
Post Reply