Home > Archive > Cobol > March 2007 > dds-all-formats
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| josephit 2007-03-21, 7:55 am |
| Could you tell me what this realy mean with COPY and database file? I have
this pice of code:
FD Mydatabase
LABEL RECORDS STANDARD.
01 R-Mydatabase.
COPY DDS-ALL-FORMATS OF Mydatabase.
| |
|
| In article <etr907$cc9$1@news.onet.pl>, josephit <dakron@op.pl> wrote:
>Could you tell me what this realy mean with COPY and database file? I have
>this pice of code:
> FD Mydatabase
> LABEL RECORDS STANDARD.
> 01 R-Mydatabase.
> COPY DDS-ALL-FORMATS OF Mydatabase.
>
>
Meaning is the result of interpretation, as Wittgenstein puts it, sort of,
almost, maybe... but the first place to look to find such a thing might be
someplace like
<http://publibz.boulder.ibm.com/cgi-...1&CASE=&FS=TRUE>
DD
| |
| Rick Smith 2007-03-21, 6:55 pm |
|
"josephit" <dakron@op.pl> wrote in message news:etr907$cc9$1@news.onet.pl...
> Could you tell me what this realy mean with COPY and database file? I have
> this pice of code:
> FD Mydatabase
> LABEL RECORDS STANDARD.
> 01 R-Mydatabase.
> COPY DDS-ALL-FORMATS OF Mydatabase.
DDS-ALL-FORMATS is a text-name and
Mydatabase (in the COPY statement) is a library-name.
DDS-ALL-FORMATS is one of possibly many files
that has been built into one library file.
When the COPY statement is processed the compiler
will open the file Mydatabase.??? and retrieve the file
DDS-ALL-FORMATS.???. [Where ??? depends on
what extensions have been defined for the impementation.]
[For example, with Micro Focus, the extensions may be
LBT for the library file and CPY for the text file; but the
permissible extensions are detemined by the environment
variables COPYLBR and COPYEXT.]
| |
| William M. Klein 2007-03-21, 6:55 pm |
| The original poster didn't tell us the environment, but any time that I see
"DDS" in a COBOL program, I think COBOL/400 (or some other iSeries COBOL).
Although the syntax in this example is just
Copy library-member OF library-name
my best guess is that this is a COBOL/400 (type) structure
--
Bill Klein
wmklein <at> ix.netcom.com
"Rick Smith" <ricksmith@mfi.net> wrote in message
news:1302ir5gu7oks1b@corp.supernews.com...
>
> "josephit" <dakron@op.pl> wrote in message news:etr907$cc9$1@news.onet.pl...
>
> DDS-ALL-FORMATS is a text-name and
> Mydatabase (in the COPY statement) is a library-name.
>
> DDS-ALL-FORMATS is one of possibly many files
> that has been built into one library file.
>
> When the COPY statement is processed the compiler
> will open the file Mydatabase.??? and retrieve the file
> DDS-ALL-FORMATS.???. [Where ??? depends on
> what extensions have been defined for the impementation.]
>
> [For example, with Micro Focus, the extensions may be
> LBT for the library file and CPY for the text file; but the
> permissible extensions are detemined by the environment
> variables COPYLBR and COPYEXT.]
>
>
>
| |
| Paul Robinson 2007-03-22, 3:55 am |
| josephit wrote:
> Could you tell me what this realy mean with COPY and database file? I have
> this pice of code:
> FD Mydatabase
> LABEL RECORDS STANDARD.
> 01 R-Mydatabase.
> COPY DDS-ALL-FORMATS OF Mydatabase.
My guess is that there is a subdirectory named "mydatabase" in the
directory where this cobol source file is located, and that there is a
source file named "DDS-ALL-FORMATS.CBL" in that subdirectory.
| |
| Rick Smith 2007-03-22, 3:55 am |
|
"josephit" <dakron@op.pl> wrote in message news:etr907$cc9$1@news.onet.pl...
> Could you tell me what this realy mean with COPY and database file? I have
> this pice of code:
> FD Mydatabase
> LABEL RECORDS STANDARD.
> 01 R-Mydatabase.
> COPY DDS-ALL-FORMATS OF Mydatabase.
Second try:
<
http://publib.boulder.ibm.com/infoc...jsp?topic=/com.
ibm.etools.iseries.pgmgd.doc/c0925405365.htm >
-----begin quoted material
Describing a Transaction File
To use a TRANSACTION file in an ILE COBOL program,
you must describe the file through a file description entry in
the Data Division. See ILE COBOL for AS/400 Reference
for a full description of the File Description Entry. Use the
Format 6 File Description Entry to describe a
TRANSACTION file.
A file description entry in the Data Division that describes a
TRANSACTION file looks as follows:
FD CUST-DISPLAY.
01 DISP-REC.
COPY DDS-ALL-FORMATS OF CUSMINQ.
In ILE COBOL, TRANSACTION files are usually
externally described. Create a DDS for the
TRANSACTION file you want to use. Refer to Defining
Transaction Files Using Data Description Specifications
for how to create a DDS. Then create the
TRANSACTION file.
Once you have created the DDS for the TRANSACTION
file and the TRANSACTION file, use the Format 2 COPY
statement to describe the layout of the TRANSACTION
file data record. When you compile your ILE COBOL
program, the Format 2 COPY will create the Data Division
statements to describe the TRANSACTION file. Use the
DDS-ALL-FORMATS option of the Format 2 COPY
statement to generate one storage area for all formats.
(C) Copyright IBM Corporation 1992, 2006. All Rights
Reserved.
-----end quoted material
| |
| Michael Russell 2007-03-22, 9:55 pm |
| TP:
No idea what a 'transaction' file is. However, I've seen 'DDS'
used to declare keys for an isam file on AS/400s.
Michael
Rick Smith wrote:
> "josephit" <dakron@op.pl> wrote in message news:etr907$cc9$1@news.onet.pl...
>
> Second try:
>
> <
> http://publib.boulder.ibm.com/infoc...jsp?topic=/com.
> ibm.etools.iseries.pgmgd.doc/c0925405365.htm >
>
> -----begin quoted material
> Describing a Transaction File
>
> To use a TRANSACTION file in an ILE COBOL program,
> you must describe the file through a file description entry in
> the Data Division. See ILE COBOL for AS/400 Reference
> for a full description of the File Description Entry. Use the
> Format 6 File Description Entry to describe a
> TRANSACTION file.
>
> A file description entry in the Data Division that describes a
> TRANSACTION file looks as follows:
>
> FD CUST-DISPLAY.
> 01 DISP-REC.
> COPY DDS-ALL-FORMATS OF CUSMINQ.
>
> In ILE COBOL, TRANSACTION files are usually
> externally described. Create a DDS for the
> TRANSACTION file you want to use. Refer to Defining
> Transaction Files Using Data Description Specifications
> for how to create a DDS. Then create the
> TRANSACTION file.
>
> Once you have created the DDS for the TRANSACTION
> file and the TRANSACTION file, use the Format 2 COPY
> statement to describe the layout of the TRANSACTION
> file data record. When you compile your ILE COBOL
> program, the Format 2 COPY will create the Data Division
> statements to describe the TRANSACTION file. Use the
> DDS-ALL-FORMATS option of the Format 2 COPY
> statement to generate one storage area for all formats.
>
> (C) Copyright IBM Corporation 1992, 2006. All Rights
> Reserved.
> -----end quoted material
>
>
>
| |
| Frederico Fonseca 2007-03-22, 9:55 pm |
| On Wed, 21 Mar 2007 13:36:46 +0100, "josephit" <dakron@op.pl> wrote:
>Could you tell me what this realy mean with COPY and database file? I have
>this pice of code:
> FD Mydatabase
> LABEL RECORDS STANDARD.
> 01 R-Mydatabase.
> COPY DDS-ALL-FORMATS OF Mydatabase.
>
This is a common format used on OS400 compilers.
AS400 files, being it "data" files, report files or screen files, can
have several "formats" although these are mainly used on screen and
report files.
The files can also have "indicatores" which are used to setup strings,
protection flags and other attributes on the files (screens mainly,
but reports also).
So a screen would for example have the following common formats.
output
input
indicatores.
Most people elect to retrieve the indicatores separately as it is
easier to deal with, but lets leave these out for now.
when related to "data" files you can have the following on a DDS.
(converted to COBOL. not in a mood to give a full DDS layout.
01 client-record.
05 client-number pic x(10)
05 client-name pic x(40).
01 agent-record.
05 agent-number pic x(10).
05 agent-type pic x(1).
05 sales-area pic x(10).
When doing a copy DDS-ALL-FORMATS that is what the compiler will
retrieve from the file definition and place on your program
If instead you used copy DDS-AGENT-RECORD (or something similar, cant
remember now), then only the agent-record layout would be retrieved,
and written to the file should you update it.
This is also requires the use of a indicator/record type to tell the
file manager what type of record is being inserted/updated to the
file.
Really a short explanation, and you are better off searching the
online manuals on IBM as others have mentioned.
This means that the fi
Frederico Fonseca
ema il: frederico_fonseca at syssoft-int.com
| |
| Frederico Fonseca 2007-03-22, 9:55 pm |
| On Fri, 23 Mar 2007 01:18:26 +0000, Frederico Fonseca
<real-email-in-msg-spam@email.com> wrote:
>On Wed, 21 Mar 2007 13:36:46 +0100, "josephit" <dakron@op.pl> wrote:
>
>This is a common format used on OS400 compilers.
>
>
>AS400 files, being it "data" files, report files or screen files, can
>have several "formats" although these are mainly used on screen and
>report files.
>
>
>The files can also have "indicatores" which are used to setup strings,
>protection flags and other attributes on the files (screens mainly,
>but reports also).
>
>
>So a screen would for example have the following common formats.
>
>output
>input
>indicatores.
>
>Most people elect to retrieve the indicatores separately as it is
>easier to deal with, but lets leave these out for now.
>
>when related to "data" files you can have the following on a DDS.
>(converted to COBOL. not in a mood to give a full DDS layout.
>
>01 client-record.
> 05 client-number pic x(10)
> 05 client-name pic x(40).
>
>01 agent-record.
> 05 agent-number pic x(10).
> 05 agent-type pic x(1).
> 05 sales-area pic x(10).
>
>When doing a copy DDS-ALL-FORMATS that is what the compiler will
>retrieve from the file definition and place on your program
>
>If instead you used copy DDS-AGENT-RECORD (or something similar, cant
>remember now), then only the agent-record layout would be retrieved,
>and written to the file should you update it.
>
>This is also requires the use of a indicator/record type to tell the
>file manager what type of record is being inserted/updated to the
>file.
>
>Really a short explanation, and you are better off searching the
>online manuals on IBM as others have mentioned.
>
>
Just to add a link with the possible variations of DDxxx
http://publib.boulder.ibm.com/infoc...s02.htm#ToC_680
Frederico Fonseca
ema il: frederico_fonseca at syssoft-int.com
| |
|
|
|
|
|