Page 1 of 1

Report generation - using Sort

PostPosted: Fri Dec 10, 2010 7:34 pm
by karthi_ind
Hi all,

I have to create a report in the format below:

Input
Status   id   id1    id2  price   qty   error
-----------------------------------------------
 aaa     1     1       1     100     10   inv-type                              man-err               typ-err
 bbb     2     2       2       50     5                   typ-err                  new-err   send-err              man-err


output
Status  id   id1    id2  price   qty   error
-----------------------------------------------
  aaa     1     1       1    100     10    inv-type
                                                        man-err
                                                        typ-err
<one blank line>
  bbb      2    2       2       50     5     typ-err
                                                       new-err
                                                       send-err
                                                        man-err


The only difference in the output file is the error field has to be displayed column wise for each row, then one blank line
and same for all other records. There are spaces in between the errors, that needs to be removed and bring it to the next column from the input file.

Re: Report generation - using Sort

PostPosted: Fri Dec 10, 2010 10:03 pm
by Frank Yaeger
What is the RECFM and LRECL of the input file?

What position do the "errors" start in and what position do they end in? What is the maximum number of "errors" per record?

Re: Report generation - using Sort

PostPosted: Sat Dec 11, 2010 12:02 pm
by karthi_ind
Hi Frank,

The details are as below

RECFM is FB and the input file record size is 252.
But the output file size should be max 133. (as it is a report file)

The errors positions starts at 83 and ends at 252. Maximum no of errors can be 6 to 7. But it depends.

As i mentioned initially the error can be for example in the first field, third field and the last field for some records. And only in the third field and last field for some other records. But in the output file it should be displayed as a column wise (as mentioned in the example). Field means the error 'inv-type' in the first field, the error 'man-err' in the thrid field .. like wise.

Thanks.

Re: Report generation - using Sort

PostPosted: Sat Dec 11, 2010 12:44 pm
by karthi_ind
Hi Frank ,

The version which I am using is

Z/OS DFSORT V1R5

Thanks.

Re: Report generation - using Sort

PostPosted: Wed Dec 15, 2010 1:07 am
by skolusu
karthi_ind wrote:The errors positions starts at 83 and ends at 252. Maximum no of errors can be 6 to 7. But it depends.


Well you have mentioned that the errors can vary . So what is the length of each error? The total error length is 170 bytes. What is the length of each individual error? The posts here and on other board indicate that you have a old version of DFSORT which is NOT supported. Even for this request you may need SQZ to handle varying length errors.

Re: Report generation - using Sort

PostPosted: Thu Dec 16, 2010 3:07 pm
by karthi_ind
Thanks Frank and Skolusu for your reply and spending time on this.