Db2 for z/OS & Db2ZAI

 View Only

 Order for specifying options in the LOAD utility statement

  • IBMChampion
Soledad Martinez's profile image
Soledad Martinez IBM Champion posted Fri February 07, 2025 09:19 AM

Hello, 

at the  Syntax and options of the LOAD control statement - IBM Documentation is stated the following:

 The syntax diagram shows the supported order for specifying options in the LOAD utility statement. Although specifying options in a different order might work, alternative specifications are not supported by IBM.>|

Has anybody faced any problem with the order so far? Would my LOAD report some informational message saying that some parameter has been IGNORED or is it something that could be totally unnoticed? 

Going further, is the Options order something to be reviewed at our existing LOADs?

Thanks,

Roy Boxwell's profile image
Roy Boxwell IBM Champion

Hi!

 I think it goes back to the time when people used LOAD RESUME ... REPLACE PART nnn syntax but got the keyword order slightly wrong, as then it could wipe your whole tablespace and not just the partition you intended. Getting the options in the correct order stops this "minor" error from being possible.

Soledad Martinez's profile image
Soledad Martinez IBM Champion

Hello Roy,

Thanks for this, good point.

When I read it I was wondering whether it could be something new, some new problem, as it was "recently" added as remark both to Db2 12 and 13 documentation.

Thanks again!

Patrick Malone's profile image
Patrick Malone

I am on the team that made the decision to add this doc change. The REPLACE keyword was the reason for a recent discussion.   A user ran LOAD INTO TABLE PART n (field-specification-list) REPLACE and was expecting the REPLACE to be on the PART n rather than the entire table space; however, the way it is processed the REPLACE applies to the entire table space.  Generally speaking the syntax diagram documents the supported order.

Soledad Martinez's profile image
Soledad Martinez

Hello Patrick, 

great, so as Roy has already pointed the reason was only on the RESUME ... REPLACE PART ... problem.

Thank you very much for the explanation! 

Soledad Martinez's profile image
Soledad Martinez IBM Champion

Hello Patrick, 

great, so as Roy has already pointed the reason was only on the RESUME ... REPLACE PART ... problem.

Thank you very much for the explanation!