× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



If the table changes, one can use the ALTER TABLE command; I used to do that. Personally, though, I now create a new table in a test library, use the CPYF command to push the data records, then a DLTF / CRTDUPOBJ. I replace the old DDL source with the new layout's source.

Jerry C. Adams
IBM System i Programmer/Analyst
--
B&W Wholesale
office: 615-995-7024
email: jerry@xxxxxxxxxxxxxxx


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Tom Deskevich
Sent: Wednesday, April 29, 2009 4:23 PM
To: RPG programming on the IBM i / System i
Subject: RE: Confused about DDL and DDS

ok, I think that answers my last question, how do I 'run' this.

The RUNSQLSTM reads the source file specified and executes the SQL commands.

I guess you could say that the DDL text file in a sense is DDS and CRTPF
combined into one.

Tom Deskevich
Infocon Corporation
Phone 814-472-6066
Fax 814-472-5019


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of DeLong, Eric
Sent: Wednesday, April 29, 2009 3:16 PM
To: RPG programming on the IBM i / System i
Subject: RE: Confused about DDL and DDS


In this location, we store a series of statements in a source member,
that create the file object and apply the label text and column
headings. This "source" is then "compiled" with the RUNSQLSTM command.


Here's an abridged sample:
CREATE TABLE PGPAPPLOGR (
JOB_NAME for column LOGJOBN
CHAR(10)
CCSID 37
not null default '' ,
JOB_USER for column LOGJOBU
CHAR(10)
CCSID 37
NOT NULL DEFAULT '' ,
JOB_NBR for column LOGJOB#
CHAR(6)
CCSID 37
NOT NULL DEFAULT '' ,
EVENT_TS for column LOGEVTTS
TIMESTAMP
NOT NULL ,
EVENT_TYPE for column LOGEVTTYP
CHAR(10)
CCSID 37
NOT NULL default '',
EVENT_MSG for column LOGEVTMSG
CHAR(80)
NOT NULL default '');

RENAME TABLE PGPAPPLOGR TO PGPAPPLOG;

LABEL ON COLUMN PGPAPPLOG
( JOB_NAME IS 'Job ID Name ' ,
JOB_USER IS 'Job ID User ' ,
JOB_NBR IS 'Job ID Number ' ,
EVENT_TS IS 'Event Timestamp ' ,
EVENT_TYPE IS 'Event Type ' ,
EVENT_MSG IS 'Event Message ');



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Tom Deskevich
Sent: Wednesday, April 29, 2009 3:51 PM
To: IBM i / System i
Subject: Confused about DDL and DDS

I have been searching through the archives and the web.

I want to create a data base file using DDL. Is DDL just a text file
created with PDM with a CREATE statement in it? I did not see any
examples anywhere except CREATE statements. I never saw the equivalent
of DDS for the CREATE to look at.

I do not see a source type DDL in PDM.

Signed, confused in Ebensburg...

Tom Deskevich
Infocon Corporation
Phone 814-472-6066
Fax 814-472-5019


--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.