Page 1 of 1

ICE126A 2 INCONSISTENT *INREC IFTHEN 1 REFORMATTING FIELD

PostPosted: Mon Sep 07, 2009 6:52 pm
by prasadhope
Hi All,

I was trying to resolve this issue, could you plesae help me..i'm getting folowing error,

ICE201I E RECORD TYPE IS V - DATA STARTS IN POSITION 5
ICE126A 2 INCONSISTENT *INREC IFTHEN 1 REFORMATTING FIELD FOUND

for the control card statements

SORT FIELDS=COPY
ALTSEQ CODE=(5AFC,E0EC,4A63,A159,D0DC,6ACC,C043,
43C0,59A1,634A,7CB5,B57C,CC6A,DCD0,ECE0,FC5A)
INREC IFTHEN=(WHEN=(12,7,CH,EQ,C'WPK'),
BUILD=(1,27,TRAN=ALTSEQ))
OUTREC IFTHEN=(WHEN=(5,1,CH,EQ,C'C'),
BUILD=(1,327,TRAN=ALTSEQ))


Thanks in advance

Re: ICE126A 2 INCONSISTENT *INREC IFTHEN 1 REFORMATTING FIELD

PostPosted: Tue Sep 08, 2009 3:34 am
by Frank Yaeger
There are several problems with your statements.

   INREC IFTHEN=(WHEN=(12,7,CH,EQ,C'WPK'),
      BUILD=(1,27,TRAN=ALTSEQ))


Since you're working with a VB input file, you have to account for the RDW in positions 1-4 so your BUILD should be:

    BUILD=(1,4,5,23,TRAN=ALTSEQ))


I don't know if you took the RDW into account for the starting position of 12.

Your OUTREC statement is also in error.

Since I don't know what you're trying to do, I can't tell you how to correct your statements.

Start over and show an example of the records in your input file and what you expect for output. Explain the "rules" for getting from input to output.

Re: ICE126A 2 INCONSISTENT *INREC IFTHEN 1 REFORMATTING FIELD

PostPosted: Tue Sep 08, 2009 8:34 am
by prasadhope
Thankx yaegar,

Here's my input file,

SSD00100VOR GCB2009072220090722004841000001041Etb WP-Stammdaten
SSD00100KLH DE000AK0EMP0AK0EMPD1334 EDF000000000000000000 ETB 00000000
SSD00100WPK DE000@@0EMP0AK0EMPD1334 EDF1NN31.12.999922.06.2009EURETBJ J


My requirement is,

If 9-12 column contains "WPK" then I need to translate from cols 1 to 27 and for others I need to translate the whole row

I think this will clear,

thankx in advance

Re: ICE126A 2 INCONSISTENT *INREC IFTHEN 1 REFORMATTING FIELD

PostPosted: Tue Sep 08, 2009 8:57 pm
by Frank Yaeger
Here's a DFSORT job that will do what I think you're asking for:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (VB)
//SORTOUT DD DSN=...  output file (VB)
//SYSIN    DD    *
  OPTION COPY
  ALTSEQ CODE=(5AFC,E0EC,4A63,A159,D0DC,6ACC,C043,
  43C0,59A1,634A,7CB5,B57C,CC6A,DCD0,ECE0,FC5A)
  INREC IFTHEN=(WHEN=(13,7,CH,EQ,C'WPK'),
    BUILD=(1,4,5,27,TRAN=ALTSEQ)),
   IFTHEN=(WHEN=NONE,
    BUILD=(1,4,5,TRAN=ALTSEQ))
/*