Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
Just wondering if it is possible.
The job below works fine, but just for experimentation, tried to do the build from 1 to 3451 and an overlay of the only position that needs to be changed. I couldn't find any examples of using the BUILD and OVERLAY together, and by trial and error of combining the two options have only met with errors
Not a problem if it isn't possible as the job I have already created works fine anyway.
Code:
ICE201I H RECORD TYPE IS F - DATA STARTS IN POSITION 1
OUTREC IFTHEN=(WHEN=(3452,1,CH,EQ,C'B'),
OVERLAY(3447:C'A'),
BUILD=(1,3451)),
$
ICE107A F DUPLICATE, CONFLICTING, OR MISSING INREC OR OUTREC STATEMENT OPERANDS
IFTHEN=(WHEN=(3452,1,CH,EQ,C'2'),
$
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY
BUILD=(1,3451))
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Hi expat,
I don't have DFSORT here, but I was wondering how the non-matching records from File1 will be handled in the above job, Wont it come to the output just as it is in the REFORMAT along with the indicator at pos-3452?
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
Hi Arun,
The output file contains the records that I want, in the format that I want, as I am only doing the OUTREC BUILD for the two conditions that I want to include.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Quote:
as I am only doing the OUTREC BUILD for the two conditions that I want to include.
Hi expat,
I am not sure how DFSORT works in this scenario, but I believe Syncsort will not filter records based on the IFTHENs, the unqualified records will pass to the output as it is in the REFORMAT.
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
Arun,
The DFSORT job is a replacement for another job, using two steps and SAS to produce the file. I have created both files from
a) The original job
b) The DFSORT job
and running a compare both files are exactly the same, so I have no worries over the validity of the output, but was just wondering if I could combine both the BUILD and OVERLAY together.
INREC BUILD=(1,3447,
3452,1,CHANGE=(1,C'B',C'A'),NOMATCH=(3448,1),
3449,3)
/*
//JNF1CNTL DD *
*** DELETE DUPS FROM JNF1 INPUT FILE
SUM FIELDS=NONE
/*
The CHANGE operator will evaluate the value at 3452 and if it is a "B" then it will update the value at 3448 to an "A". If it is not "B" then it will copy the contents of 3448 AS IS.