Difference between DDL and DDS

1230 pts.
AS/400 development
Data Definition Language
What is the difference between DDL and DDS. How to use DDL in AS/400

Answer Wiki

Thanks. We'll let you know when a new response is added.

DDL is a Data Definition Language.  DDL would be the commands used to create the objects which hold the data. Specifically, the CREATE TABLE command is the prime example.

Discuss This Question: 7  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • CharlieBrowne

    Both can be used to create a PF (Table) on the AS400.

    IBM has recommended that we no longer use DDS because it will no longer be enhanced. There are many functions available with DDL that are not available with DDS.

    62,385 pointsBadges:
  • Dandreb
    DDS is the method on how you define file/PF in IBMi/AS400
    DDL is the method how you define file/PF in IBM;/AS400 using SQL statements.
    Both of that simply allows to create file/PF to store data.

    If you need an automated way to convert your DDS into DDL source and with features of creating SQL object from generated DDL, and many more. I created the utility program for that and you can see the source here: https://github.com/dancarlosgabriel/DDS2DDLGeneration
    30 pointsBadges:
  • RossHowatson
    One very big difference between DDS and DDL when creating files/tables is with DDS CRTPF command reuse deleted records is set to NO and DDL command CREATE TABLE reuse deleted records is set to YES.  Therefore reading the file/table sequentially for DDL tables may not give you the order the records/rows were added.  With reuse deleted records set to YES you do not need to run the RGZPFM command (at least as often as you did before).  Also DDS created files has defaults for file size limits (unless you override it) but DDL does not.
    630 pointsBadges:
  • BigKat
    Just to be clear, the reuse deleted record option DEFAULTS to NO on the CRTPF command, but it can be SET to YES.
    9,460 pointsBadges:
  • TheRealRaven
    And to clarify even further, the default itself can be set to *YES if wished. Use the CHGCMDDFT command. This may require resetting after OS upgrades.
    36,880 pointsBadges:
  • sri8707
    DDL - Data Definition Language. Its all about schema - Create/Drop/Alter/Truncate/Rename. Using all these commands, you are modifying the structure only and not modifying the records directly

    DML - Data Modification Language. Its about modifying the data - Insert/Update/Delete. Here, you are dealing with individual records
    670 pointsBadges:
  • Subhendu Sen
    142,210 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: