|
INTERVIEW QUESTIONS
DATA WAREHOUSING
DATASTAGE
DETAILS
Question: My requirement is like this :
Here is the codification suggested:
SALE_HEADER_XXXXX_YYYYMMDD.PSV SALE_LINE_XXXXX_YYYYMMDD.PSV
XXXXX = LVM sequence to ensure unicity and continuity of file exchanges Caution, 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.ZIP
if 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.
i.e., whenever we run the same job the target files automatically changes its filename to filename_increment to previous number(previousnumber + 1)_currentdate;
Please do needful by repling this question..
Answer: This can be done by using unix script
1. KeepĀ the Target filename as constant name xxx.psv
2. Once the job completed, invoke the Unix Script through After job routine - ExecSh
3. The script should get the number used in previous file and increment it by 1, After that move the file from xxx.psv to filename_(previousnumber + 1)_currentdate.psv and then delete the xxx.psv file.This is theĀ Easiest way to implement.
|
|
|
Category |
DataStage Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 9450 users |
Added on |
7/26/2011 |
Views |
67351 |
Rate it! |
|
|
Question:
My requirement is like this :
Here is the codification suggested:
SALE_HEADER_XXXXX_YYYYMMDD.PSV SALE_LINE_XXXXX_YYYYMMDD.PSV
XXXXX = LVM sequence to ensure unicity and continuity of file exchanges Caution, 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.ZIP
if 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.
i.e., whenever we run the same job the target files automatically changes its filename to filename_increment to previous number(previousnumber + 1)_currentdate;
Please do needful by repling this question..
Answer:
This can be done by using unix script
1. KeepĀ the Target filename as constant name xxx.psv
2. Once the job completed, invoke the Unix Script through After job routine - ExecSh
3. The script should get the number used in previous file and increment it by 1, After that move the file from xxx.psv to filename_(previousnumber + 1)_currentdate.psv and then delete the xxx.psv file.This is theĀ Easiest way to implement.
Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What is the transaction size and array size in OCI stage?how these can be used?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All DataStage Interview Questions & Answers - Exam Mode /
Learning Mode
|