Tuesday, 14 August 2012

scenario 5



A sequential file has 8 records with one column, below are the values in the column separated by space,
1 1 2 2 3 4 5 6
output-
File 1 records separated by space: 1 1 2 2
File 2 records separated by space: 3 4 5 6

1 comment:

  1. Duplicates and Uniques can be diverted using any of 2:
    Dstg8.5
    using Saveinputrecord() utility and Lastrow ingroup() function,
    OR
    Dstg8.1
    Use the stage variable to get an incremented number in front of row starting with 0 if the row is appearing more than once. get the sum of the group in front of every row. Filter out those having values greater than one uniquely and lookup with source file to get out rejects as uniques and success records as duplicates.

    THEN

    Use Stage Variable
    Stgvar:
    IF @INROWNUM = 1
    THEN
    Lk_File1.a
    ELSE
    var2 : char(32) : Lk_File1.a
    StgVar1=StgVAr
    put constraint as LastRow()
    O/p Link as : Stagevar1

    Thats it! Cheers!

    ReplyDelete