Create source from a file object

2505 pts.
Tags:
AS/400
AS/400 objects
STRSEU
I have an utility which displays the file fields and keys. Now I want to add an option in that utility to create the source of that object. Can anyone help me to figure out the command which will create the source of an object? My intention is when I take F9 from that tool, it should ask for source file, lib, member type(Pf non amendable) something similar to STRSEU. I don't want to create a display file for this. Instead if I can use some existing command, it would be helpful. After entering the details, I want the source(DDS) to be created inside the source physical file that I have entered.

Software/Hardware used:
AS400 DDS

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 2  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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    No such command exists. It's possible to use various APIs to retrieve all available attributes of a *FILE object, and to have your program figure out what most of the source would look like. For a database file, the Retrieve Database File Description (QDBRTVFD) API would be most useful.

    For some database files, the "source" might be a SQL CREATE TABLE, CREATE VIEW or CREATE INDEX statement rather than DDS. You'd want to be certain exactly what you were working with because you'd want to recreate those in the same form. But recreating a DDS PF or LF as an SQL object would often be an improvement.
    .
    Tom
    125,585 pointsBadges:
    report
  • CharlieBrowne
    If your utility displays all the information you need to build the source member, your F9 function should be able to use the name of the file that is displayed and fo a ADDPFM to a sepecific LIB/SourceFile. I'm guessing your utility built files in QTEMP so it can do the display of the PF. So now call a program to read those files and write to the source member you just created. You may be able to do it with SQL Inserts, Does this help?
    41,370 pointsBadges:
    report

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following