How to know whether the CSV extraction to PF happened today

2505 pts.
Tags:
AS/400
CSV
Physical File
I have a requirement like this. I have 2 separate program which is called as part of daily job. I need to extract a CSV data onto an AS/400 physical file and this file is being used in both the programs. I need to put the call to extract the CSV in any of the 2 program and have to check in the other program whether the file has already been extracted for that day. How can I achieve this?

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: 6  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
  • RamvishakRamesh
    I am thinking about adding an extra field for date to the AS400 file and update the field with today's date after importing the csv data on to the AS400 file. In the other program, I will be checking whether the date is today's date, if so the extraction is assumed to happen today.  But the problem since I am using a CL I have to now use SQL for the update. Any other better solution?
    2,505 pointsBadges:
    report
  • TomLiotta
    Instead of a DATE field, use a TIMESTAMP field. You can use SQL. Why is it a problem? Compile a QM query to update the timestamp. If you don't want to use SQL, create a *DTAARA to hold the timestamp value. No need to alter the table to add a field. -- Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    Perhaps these will be of interest.  The file object has properties that might be of interest . last change date.   Interactively -- DSPFD.      Programmatically -- RTVMBRD CHGDATE  and/or USEDATE.     
    49,960 pointsBadges:
    report
  • RamvishakRamesh
    Tha sounds interesting... but the CHGDATE field can give the current date if I made some changes using dbu or someother way in the background. I meant I ahvent imported the csv file today, but I have manually made some changes to that pf.. then also it shows the CHGDATE as Today right?
    2,505 pointsBadges:
    report
  • philpl1jb
    Yes, you're correct. The change date is the last time the data was changed. Prehaps your process could delete the file and then create the file. The create date could then be used to identify when the data was loaded.
    49,960 pointsBadges:
    report
  • Splat
    If the file can't or shouldn't be deleted and re-created, you might consider multiple members within the file.
    7,235 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