MY requirement is to get same record counts using JCL - Syncsort.
MY Input File contains the packed decimal values in 58-60 position. I need to get the record count when the input in between 01 and 05 range.
Actually I tried to convert PD values into ZD and compare with C'01' and C'05'.
I could not get the result.
Ex: Input File data in 58-60 (3 bytes which is in Comp-3 Format)
07.2
05.2
04.0
45.7
02.4
Output will be:
RF value | Count
02.4 1
04.0 1
Can anybody please let me know how to acheive this?
Your specifications state that the field is 3-byte PD format, but you provide example records that conatin a decimal point. PD data cannot contain a decimal point, so I am going to assume that the decimal point is implied. The 3-bytes of data that correspond to your value 07.2 would actually contain x'00072C' for purposes of the following.
To make the example easier to understand (and not knowing details of your record layout), I am treating the 3-byte PD field as if it begins in position 1 of fixed-length data. Feel free to modify the example to fit your actual data layout.
//SYSIN DD *
SORT FIELDS=(1,3,PD,A)
INCLUDE COND=(1,3,PD,GT,10,AND,1,3,PD,LT,50)
OUTREC FIELDS=(1,3,PD,ZDF,75X)
OUTFIL FILES=OUT,NODETAIL,
SECTIONS=(1,5,
TRAILER3=(1:1,4,C'.',5,1,COUNT))
/*
For any further support, contact Customer Service, Syncsort Inc. [email protected]