Menu

Using distinguishFieldValue

Nivek N
2012-02-25
2013-05-13
  • Nivek N

    Nivek N - 2012-02-25

    Is it possible to differentiate records using 'distinguishFieldValue' if the value that indicates the record type does not occur at the beginning of the record? Any help would be appreciated. Thanks.

     
  • Pawel Maczka

    Pawel Maczka - 2012-02-26

    No, but I had a case with some static leading data so you can probably make the distinguish field to include the static data as workarround. If it cannot be applied please describe your case little longer?

     
  • Nivek N

    Nivek N - 2012-02-27

    Unfortunately, the leading data is not static, although it is part of a record header with the same schema for all record types. Here is a simplified version of the copybook I'm working with. The 'body' differs greatly between record types.

    01 REC-A.
    03 REC-A-HEADER.
    05 FLD-1 PIC X(04).
    05 FLD-2 PIC X(02).
    05 FLD-3 PIC X(08).
    05 FLD-4 PIC X(03).
    05 FLD-5 PIC 9(06).
    05 FLD-6 PIC X.
    05 FLD-7 PIC 9(05).
    05 FLD-8 PIC X(02).
    05 REC-TYPE PIC X. (Always 'A')
    03 REC-A-BODY.

    01 REC-B.
    03 REC-B-HEADER.
    05 FLD-1 PIC X(04).
    05 FLD-2 PIC X(02).
    05 FLD-3 PIC X(08).
    05 FLD-4 PIC X(03).
    05 FLD-5 PIC 9(06).
    05 FLD-6 PIC X.
    05 FLD-7 PIC 9(05).
    05 FLD-8 PIC X(02).
    05 REC-TYPE PIC X. (Always 'B')
    03 REC-B-BODY.

    Are there any other possible workarounds I could use? Thanks for your help.

     
  • Pawel Maczka

    Pawel Maczka - 2012-02-28

    It requires a modification. I could make it if you send me: 1. full copybook; 2. sample data for testing. The modification seems to be serious so I need about 4 weeks or more to find time to do it. Anyway if it is too long for you I would appreciate for files so I can add new feature for the project for the rest of the world. You can send the files on my email if it is confidential.

     
  • Nivek N

    Nivek N - 2012-03-01

    I would definitely appreciate the modification and think others would too. I'll send you sample files to work with. Thanks!

     
  • Nivek N

    Nivek N - 2012-04-09

    Hi Pawel,

    Do you have any availability in the near future to look into this update? Thanks for your help.

     
  • Pawel Maczka

    Pawel Maczka - 2012-04-11

    Hi, I am very busy next months and will not be able to handle the modification. Don't hesitate to provide a patch if you have one. The source is available with cvs.

     

Log in to post a comment.