Delete Physical file member data (selected)

10 pts.
Tags:
AS/400
AS400 physical file
I have a physical file in AS/400 machine which has a member which contains history data. I tried to delete few records from the member using SQL statement. but there is no place to enter the member name in the SQL statement. So I need to know a method to delete few selected records in the file member. Please advise me.
kcs


Software/Hardware used:
AS/400
ASKED: September 12, 2012  10:12 AM
UPDATED: September 12, 2012  11:44 AM

Answer Wiki

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

I always use the SQL CREATE ALIAS option 

Discuss This Question: 4  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
    SQL has no concept of "members". You generally shouldn't use multi-member files for SQL processing. However, you can run OVRDBF to override a file to a specific member before running a SQL statement, and SQL will honor the override. You can also run a SQL CREATE ALIAS statement to create a more permanent object reference to a member; then run your statement against the ALIAS. -- Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    CREATE ALIAS makes sense to me when the intention is to create a permanent object. For example, members might exist for CURRENT and PREVIOUS data, and those two will always be the same. Or there might always be 12 months of data that you will name JANUARY, FEBRUARY, etc.   An ALIAS can be created in QTEMP in order to make it effectively temporary, but all of the overhead of creating a permanent object, including setting ownership and authorities still happens by default. As a permanent object, attributes ought to be managed.   An override is intended to be temporary. Its effects are specifically limited to the current job. No additional overhead is involved. All effects are applied only to whatever ODP is created in the job. The only extra overhead is the minimum updating of fields in the ODP that exists.   Also, an ALIAS necessarily has a different name from the object. That can have implications in the future if the database is re-engineered. Ideally, the ALIAS name could be the name used for some future VIEW that might replace 'members' in the future. That would help make potential code re-engineering easier.   It can be a little more difficult to enter an override than to create an ALIAS if you are within STRSQL, but fairly immediate access can be obtained by running CALL QUSCMDLN from the SQL command line or by accessing an attention program or other means. (For QUSCMDLN, or QCMD or whatever, the affects of invoking as a stored proc might vary with the OS version; and it should be tested first.)   There are factors to the choice of override or CREATE ALIAS. It might be personal preference, but it should take the system environment into consideration.   Tom
    125,585 pointsBadges:
    report
  • MuraliBabu
    Overide the file with the corresponding member and try to delete the record from the file. System will allow you to delete the records from the particluar member.
    20 pointsBadges:
    report
  • MuraliBabu
    Overifde the file with the member from the command prompt and  go to the STRSQl and delete the records from the overridden file.
    20 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