AS400 I have a flat physical file,this flat file will be updated daily by datewise.I have to use an CLP for copying the records by the datewise daily

25 pts.
Tags:
AS/400 Subfiles
Physical File
I have a flat physical file ,this flat file will be updated daily by date wise . I have to use an CLP for copying the records by the date wise daily and copy that data to another Physical file and change the naming conventions of the file and send the data to mainfram system using FTP( FTP too we have to mention in the CLP .

Answer Wiki

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

What is the question?
Phil

//////////////////////////////
Hi

So flatfile has new records added each day.
Do the records contain a date?
– what does it look like and does it contain time?
– is it always in the same columns?
Are you certain that your CL will run every day that there is a date for or would
you need a strategy to get missing days or the part of the day after your CL runs.

Phil

//////////////////////////////////////////////////
OK, I would retain the date of the last record processed in a data area

CL would: 1. Rtv the value from the data area into &LastDate
2. Use the Cpyf Martin showed below but change to: INCCHAR(*RCD 1 *GT &LastDate)
where 1 is the Beginning column of the date field
3. Compute Yesterdays date in the CCYYMMDD format and put it in the data area
— if you have TAATOOL you can use ADDDAT to get this date in this format
4. FTP the file.

Phil

Discuss This Question: 3  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
  • Sunilinline
    Hi Phil Thanks for responding , In AS400 I have to write a clp for Fetching the data according to the date wise (because it will updated daily )from the physical file and copy the data to another physical file and then rename and i have to FTP that physical file to the mainframe system. Do let me know if you have any clarifications . Thank for responding. Thanks Sunil
    25 pointsBadges:
    report
  • Gilly400
    Hi, You can probably use CPYF (Copy File) for this - Define a field &DATE and fill it with your date in the correct format, then :- CPYF FROMFILE(Yourfile) TOFILE(Tempfile) MBROPT(*REPLACE) CRTFILE(*YES) INCCHAR(*RCD 1 *CT &DATE) This should then copy all the records containing your date. Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • Sunilinline
    Hi Phil Sorry it's data file, yes records are added each day like (((20090522)client name followed by date ) but the client name will differ )the record are added to the file by date wise. Yes the date will be in the same column. But the records won't be added on saturday & Sunday , the friday data will come on every monday. Monday data will come on early morning tuesday (4:30 am EST) On hoildays the record won't come in . The record will be added to the physical file @4 :30 am EST. Thanks Sunil
    25 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