Page 2 of 2

Posted: Sun Sep 12, 2010 4:39 am
by sirianangel
Position representation of xxxx, yyyy in my earlier post have been changed...
Here are proper explanations of xxxx/yyyy if my earlier post explanation was not clear

T1 output file:
BALANCE: HEAD-1111:xxxx 1111:yyyy

xxxx-> Input HEADER segment count value (i.e 13,4 in input file and 21,4 in ICETOOL)
yyyy-> Calculated count in ICETOOL i.e. position 37,4

Posted: Tue Sep 14, 2010 2:17 am
by Frank Yaeger
I can't make much sense out of what you're telling me.

Here's what I see which I think relates to your question:

Code: Select all

HEADER  1111A003 
You have A003 in your HEADER - this is NOT a valid numeric.

Code: Select all

  IFTHEN=(WHEN=(1,6,CH,EQ,C'HEADER'), 
  OVERLAY=(100:13,4, 
  104:C'0000'),HIT=NEXT), 
You move A003 to position 100-103 - A003 is still NOT a valid numeric.

Code: Select all

11:'HEAD-1111:',21:TOT=(100,4,UFF,TO=ZD,LENGTH=4), 
You do a TOT with UFF for the value A003 which is still NOT a valid numeric. UFF treats A003 as 0003 since it only extracts valid decimal digits and A is NOT a valid decimal digit.

I don't know what it is you're trying to do. What does A003 represent? How can you expect to total a non-numeric value correctly? If you're trying to treat A003 as a binary value (X'C1F0F0F3') rather than as a numeric value, use BI instead of UFF.

Posted: Tue Sep 14, 2010 4:56 am
by sirianangel
Frank,

We are almost on the same page.

I agree with you that value A003 is NOT a valid numeric value. But as one of my test cases, I wanted to test the numeric field with junk or alpha numerics. As i don't have any control on the input file, I am assuming that there might be a chance for some junk or alphanumeric values to be written in to this numeric field.

Now considering that the numeric field has a alpha numeric value like A, the TOT function should not treat A003 as 0003. It should say that there is a unacceptable value in numeric field and it should abend.

I am testing the ICETOOL code that i shared earlier with all possible cases to fail the job. So when there is alpha numeric value, the TOT function should not replace it with zero or other numeric value. It should fail.

Please let me know if there is a way to make TOT function read A003 as A003 only and fail.


Note : To satisfy the above condition,is it must to use Binary instead of UFF? IN this case, I am afraid, I am not aware of the initial values to be defined. Like in UFF, i defined the intial values as C'0000' in UFF. If i should change all UFF/SFF to BI, then could you please help me in changing the ICETOOL code. Also, please note that the incoming data is ZD. So even the input should be converted to BI before proceeding with comparsions.

Posted: Tue Sep 14, 2010 5:58 am
by Frank Yaeger
Now considering that the numeric field has a alpha numeric value like A, the TOT function should not treat A003 as 0003. It should say that there is a unacceptable value in numeric field and it should abend.
TOT will NOT ABEND or terminate for a 'A003' value - it just interprets it correctly, as documented, for the format you select.

If you want to terminate for an invalid numeric, you can probably figure out a way to do that using DFSORT's NUM function with OUTFIL and NULLOUT=RC16. For more information, see:

http://www.ibm.com/support/docview.wss? ... g3T7000086

Posted: Wed Sep 15, 2010 9:31 am
by sirianangel
Ok Frank...

So in that case, i am planning to use below steps to complete the process with RC4 in case if non numerics found in the input data in the HEADER record...

TOOLIN DD *
SORT FROM(INP01) TO (T1) USING(CTL1)
COUNT FROM(T1) NOTEQUAL(0) RC4

CTL1CNTL DD *
SORT FIELDS=COPY
INCLUDE COND=((9,4,CH,EQ,'1111'),AND,(13,4,FS,NE,NUM))

So for the sample input file we were discussing, process would complete with RC4.

If you remember, sample input file also had -9(6).99 in the HEADER record in position 29,10 i.e.

Sample Input data-
HEADER 11110003222200023333 30.00
1111
1111
1111
1114
2222
2222
2224
3333 10.00
3333 10.00
3333 10.00
4444

Could you please suggest the format to be used in INCLUDE COND to check for valid numeric data in this -9(6).99 field.

Posted: Wed Sep 15, 2010 9:51 pm
by Frank Yaeger
NUM can be used with standard character (FS), ZD and PD numeric values. It does NOT handle other numeric types including those with decimal points and leading signs.

Since you don't use code tags, I can't tell what your input data really looks like.

Show me what the -9(6).99 values look like for the maximum + value, a zero value and the maximum - value. Show each leading blank as a b. Show each leading zero. For example, something like:

+999999.99
bbbbbb+0.00
-9999999.99

or whatever it actually looks like.

Tell me the rules for determining if a numeric of this form is valid or invalid.

Posted: Wed Sep 15, 2010 10:56 pm
by sirianangel
Ok sure...

Sample input data...

HEADER 11110003222200023333 000030.00
1111
1111
1111
1114
2222
2222
2224
3333 000010.00
3333 000010.00
3333 000010.00
4444


Field to be validated to be valid numeric data is in position 29,19 of HEADER record i.e. 000030.00.

Data type: -9(6)V99
Input layout position : 29,19

1) Valid (+)maximum value:
b999999.99 (blank would represent + )


2) Valid (-)maximum value:
-999999.99

3)Valid (+) minimun value:
b000000.00 (blank would represent + )

4)Valid (-) minimun data:
-000000.00

Taking an example of 30.00. To represent this value in HEADER record for both (+) and (-) values, Input HEADER record should
have below layout which can be considered as valid.

+value
b000030.00 (b - blank)

-value
-000030.00

Invalid value would be anything other then(1 thru 4) declarations that is listed above.

For ex:
Taking the example of 30.00. If input data has below or any other layout other than (1 thru 4), should be considered has invalid data.
bA00030.00 or *000030.00 or aaaaaaa.aa or b000a30.00

Posted: Wed Sep 15, 2010 11:16 pm
by Frank Yaeger
Given the data looks like you say, you could check for an invalid value as follows:

Byte 1 (29?) is not blank or '-' or
Bytes 2-7 are not FS/NUM or
Byte 8 is not '.' or
Bytes 9-10 are not FS/NUM.

I don't know what you mean by 29,19 given that the values are 10 bytes.

Posted: Fri Oct 22, 2010 6:35 pm
by cube12ic
Basically here, if you see in the output file, I need a HEADER record with Key data 1111 & 2222 and the number of times it occured in the input file.
And for the Key data 3333, since it holds amount, I need the total amount for this Key.

I am unable to achieve this using ICETOOL. Could you please help.

Posted: Sat Oct 23, 2010 12:45 am
by Frank Yaeger
It feels like we're on a Merry-Go-Round and have come full circle. :roll:

Topic deleted by Admin

Posted: Mon Jan 25, 2016 10:03 pm
by academyindia4
<< Content deleted By Admin >>

Topic deleted by Admin

Posted: Mon Feb 01, 2016 1:29 am
by academyindia4
<< Content deleted By Admin >>

Topic deleted by Admin

Posted: Mon Feb 01, 2016 10:01 pm
by academyindia4
<< Content deleted By Admin >>