Actually my requirement is like that :Here is the codification suggested: SALE_HEADER_XXXXX_YYYYMMDD.PSVSALE_LINE_XXXXX_YYYYMMDD.PSVXXXXX = LVM sequence to ensure unicity and continuity of file exchangesCaution, there will an increment to implement.YYYYMMDD = LVM date of file creation COMPRESSION AND DELIVERY TO: SALE_HEADER_XXXXX_YYYYMMDD.ZIP AND SALE_LINE_XXXXX_YYYYMMDD.ZIPif we run that job the target file names are like this sale_header_1_20060206 & sale_line_1_20060206.if we run next time means the target files we like this sale_header_2_20060206 & sale_line_2_20060206.if we run the same in next day means the target files we want like this sale_header_3_20060306 & sale_line_3_20060306.Ie if whenever we run the same job the target files automatically changing in to filename_increment to previous number(previousnumber + 1)_currentdate;please do needful by repling this question..

Showing Answers 1 - 1 of 1 Answers

Here,the basic thing required is to add 1 to the number which was used in last load.
Following is the logic for this:

a) Initially take a file and write 0 to it.
b) Now in the sequence,create a user variable activity and call a routine there.
c) The flow would be User vaiable activity(where routine will be called) => Job activity to call the job.
d) inside the routine,write the code to read the file,increment the value read by 1 and write the incremented valued back to the file.The routine will return the incremented value back to the calliing program i.e. the variable of the user variable activity.
e)Pass this value as a parameter to the job from the job activity(uservariableactivity.incvariablename)
f)In side the job,in your target sequential file stage,declare the name as following:
sale_header_#incvariablename#_20060306

=> Now,whenever you run the sequence,the routine will read the number file,increment the value read by 1,write the incremented value to the file and pass it to the job.hence,for each run,the value will keep on getting incremented.

Nikhil Anshuman

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions