High/low value identify
Moderators: chulett, rschirm, roy
High/low value identify
Hi,
I have a ebcdic file which I am reading through CFF Stage. There is a column where high and Low values are expected. I need to reject those records. Can I identify high/low value in datastage?
Need your suggestions
I have a ebcdic file which I am reading through CFF Stage. There is a column where high and Low values are expected. I need to reject those records. Can I identify high/low value in datastage?
Need your suggestions
First, that sounds very unusual. "Filling" on high-value (xFF) is useful only when the field is used in a sort and they want all such records at the end of the sort. Low_value is x00, which is also the ASCII null. Having either or both in a field doesn't sound right at all, and if it were me I'd ask for the justification for it.
Settings to reject such records should be relatively easy except for the low-value/null problem. You can examine each byte and set to reject upon finding x00 or xFF. Position-length reference on a Char or VarChar field is setting at the end of the column name [pos,length].
Good luck.
Settings to reject such records should be relatively easy except for the low-value/null problem. You can examine each byte and set to reject upon finding x00 or xFF. Position-length reference on a Char or VarChar field is setting at the end of the column name [pos,length].
Good luck.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I believe Ray joins me in asking for further details, something specific about the column being examined.
Will it be all x00 or all xFF? Will it be some mix of the two?
The coding for this is basic. You examine the entire column or some portion of it. And to echo the usual question here: what have you tried so far, and what were the results?
Will it be all x00 or all xFF? Will it be some mix of the two?
The coding for this is basic. You examine the entire column or some portion of it. And to echo the usual question here: what have you tried so far, and what were the results?
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
Example: transformer constrainttechsavy wrote:The field will either only be high value or only low value (not both).
Incase high value - All the position of the field will be filled with xFF simillary for low value - All the position filled with x00
Code: Select all
inlink.colname[1,1] <> Char(00) And inlink.colname[1,1] <> Char(255)
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Probably easier is to use Convert() function to eliminate the low values and high values, then see if there's anything left.
Code: Select all
Convert(Char(0):Char(255),"",InLink.TheField) > ""
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Why if they're always all of one or the other? I suggested checking one character because that's what you stated. But...sure, if you feel the need.techsavy wrote:Thanks Franklin. I think I can write similar logic to Check all positions instead of only first position. Right?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers