Please help what am I doing wrong. The data is correct for 90% but it is messing up on some. Why is the GB record getting what it is. GB,"UNITED KINGDOM (ENGLAND WALES SCOTLAND NO. IRELAND) UN"TED,KINGDOM
I am just not seeing the issue. I'm going crazy it works on most the input. What am I missing??
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
speermb,
You might want to change this
Code:
INREC FINDREP=(IN=C',',OUT=C'')
to
Code:
INREC FINDREP=(IN=C',',OUT=C' ')
to replace with a blank instead of 'nothing' coz that messes up the positions in your OVERLAY. With your FINDREP, the data shifts to the left for each comma replaced.
to replace with a blank instead of 'nothing' coz that messes up the positions in your OVERLAY. With your FINDREP, the data shifts to the left for each comma replaced.
On my tablet screen, I was not able to distiguish between commas and dots in the input records.
There are really two commas in the input record, causing the rest of data to sheet two positions left (after FINDREP). So, the 'UN' from the last field moved to previous field becoming last two characters of it.
Really, replacement all commas with explicit space characters should help.
Even better solution might be using parameter PREBLANK=C',' in JFY, instead of FINDREP.
I'd like to note that I prefer giving some hints to TS, as in my first reply, just to make the TS to find his problem by himself. It' not good idea to give ready solutions on user's own errors.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
sergeyken wrote:
There are really two commas in the input record, causing the rest of data to sheet two positions left (after FINDREP). So, the 'UN' from the last field moved to previous field becoming last two characters of it.
There are 3 commas in the input, so the 'UNI' is pushed to the previous field.
After FINDREP:
Code:
----+----1----+----2----+----3----+----4----+----5----+
UNITED KINGDOM (ENGLAND WALES SCOTLAND NO. IRELAND) UNI
After JFY :
Code:
----+----1----+----2----+----3----+----4----+----5----+
"UNITED KINGDOM (ENGLAND WALES SCOTLAND NO. IRELAND) UN
Thanks for the response.
I had actually figured out this INREC FINDREP=(IN=C',',OUT=C'') was bad and changed to INREC FINDREP=(IN=C',',OUT=C' '. That was still causing field length error where I got:
Code:
GB,"UNITED KINGDOM (ENGLAND WALES SCOTLAND NO IRELAND)"UNITED,KINGDO
So I updated the code to PREBLANK=C',' on each field expecting it to make all commas in field 3,55 a space.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
sergeyken wrote:
Even better solution might be using parameter PREBLANK=C',' in JFY, instead of FINDREP.
PREBLANK in JFY can replace only specific leading or trailing characters to blanks before justify processing, not the ones embedded in a field. So it does not apply here.
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
Quote:
PREBLANK can replace only specific leading or trailing characters to blanks before justify processing, not the ones embedded in a field. So it does not apply here.
Incorrect, it will preblank all instances. I've just checked on my system.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Garry Carroll wrote:
Incorrect, it will preblank all instances. I've just checked on my system.
Garry, my comment (and the usage discussed here) was about JFY not SQZ.
DFSORT Application Programming Guide wrote:
PREBLANK=list
specifies a list of one or more characters to be changed to blanks before justify processing begins. Only leading and trailing characters are changed to blanks.
speermb,
You're on the right track with your latest card, just that you don't need the PREBLANK in JFY. Here is what I got when tried on 2 input fields and an input of LRECL=200. You can modify it to include all the input fields as per your data set attributes. Good luck.
SORTIN
Thanks all.
This worked.
I did have to do an additional step to do FINDREP to remove the ", but it works. Is there a better way (or a way to do all at once no idea).