ZOMDataSave

ZOMDataSave

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< All Topics
Print

ZOMDataSave

Exports records from selected tables into documents.

Syntax

ZOMDataSave object_specification [option…]

Options

;k [!]The ;k option is used to assign a keyword to the selected object(s). If the keyword is already assigned, this assignment is ignored. If “!” is specified, the keyword assignment is removed for the object(s).
;p [!]Set the specified user-designated property for the selected object(s). If “!” is indicated, the specified property is reset for the selected object(s).
;dThis is the name of the document to be used to store the data that is saved. The document does not need to exist prior to invoking data save.The document is (re)created with field definitions that make it suitable for saving data stored in the table.If you specify a specific document, you should execute the data save against one object, since the document contains only data from the last saved object after the command has executed.If you do not specify a document, ZOM creates a special internal document for each object.
;fIf you specify the document used to store the data and the document does not exist, you must specify the filename to be used by the document. This can be omitted if the data save document already exists.
;rThis option generates a program that executes the data save function. This program is normally put in a temporary document. By specifying the name of the document to be used to store the program, ZOMDataSave reroutes the program code to this document instead.
;qThis option causes ZOMDataSave to skip actually saving the data. Datasave documents and the programs to save data in those documents are created.

Comments

ZOMDataSave can be used to save data (including null values) in objects that can contain data (e.g. an EntitySet or relationship). The data is saved in a document that has special fields defined by ZOM. This document is (re)created every time ZOMDataSave is executed for an object. If you do not specify a document name as a parameter, ZOM generates a document name for you and internally associates this document name with the object.The ;r option can be used to also generate a program that actually carries out the save operation. This program could be incorporated directly into your application where it could be necessary to temporarily save data in an object.Reload the data into the object by using ZOMDataLoad.

Examples

The following command saves the contents of the EntitySet “Customers” to an ASCII file.

ZOMDataSave Customers

The following command saves the contents of the EntitySet “Customers” to the document “dsCusts.” The filename of the document is “custs.ds.” The program that executes the data save is generated into the document “pCustDataSave.”

ZOMDataSave Customers ;d dsCusts ;f custs.ds ;r pCustDataSave

As long as the definition of Customers does not change, subsequent data saves can be accomplished by executing the generated program, as shown below. This program can be compiled and embedded in your shipping applications.

pCustDataSave()

The following command saves the data in all objects with the datasave property set (i.e., EntitySets and relationships with fields).

ZOMDataSave +p ds

The following command makes sure that all objects with the datasave property have associated datasave documents so that, in subsequent ZOMCreate, ZOMReCreate, ZOMErase, and ZOMMove commands, the data  is preserved. The data is not actually saved at this point.

ZOMDataSave +p ds ;q

 

Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

pt_BRPortuguese