IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ICETOOL error - ICE126A


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
marpana

New User


Joined: 10 Jun 2005
Posts: 13
Location: London, UK

PostPosted: Wed Mar 22, 2006 11:01 pm
Reply with quote

I am getting error ICE126A for below code.
Input is a VSAM file with max length 1220. Need two output files created as seen in the code.
(Please note the symnames have been declared but since the error is in OUTFIL and not in INREC I haven't produced them here. Let me know if that is needed.
The situation is that input is variable length, output REPORTFL is fixed length. Works fine with OUTFIL OUTREC but gives error when used OUTFIL IFTHEN BUILD.

Code:
//INVSAM   DD DSN=TTFB.MARALA.LCOLOC.ONETRANS,DISP=SHR               
//OUTVSAM  DD DSN=TTFB.MARALA.LCOLOC30.TRFM,DISP=OLD                 
//REPORTFL DD DSN=&&REPORT,DISP=(,PASS),SPACE=(CYL,(20,50))         
//TOOLIN   DD *                                                     
  COPY FROM(INVSAM) USING(CNT2) VSAMTYPE(V)                       
/*                                                                   
//CNT2CNTL DD *
INREC IFTHEN=(WHEN=(REC_TYP,EQ,C'00',AND,LOCAT,EQ,MANCTY, -
                     OVERLAY=(5:C'1'))
OUTFIL FNAMES=OUTVSAM,OUTREC=(RDW,5:21)                 
OUTFIL FNAMES=REPORTFL,CONVERT,INCLUDE=(5,1,CH,EQ,C'1'),
           IFTHEN=(WHEN=INIT,BUILD=(21,18,30:X))           
/*


Code:
        OUTFIL FNAMES=OUTVSAM,OUTREC=(1,4,5:21)                                 
        OUTFIL FNAMES=REPORTFL,CONVERT,INCLUDE=(5,1,CH,EQ,C'1'),IFTHEN=(WHEN=I*
                      NIT,BUILD=(21,18,30:X))                                   
146I 0 END OF STATEMENTS FROM CNT2CNTL - PARAMETER LIST STATEMENTS FOLLOW       
       DEBUG NOABEND,ESTAE                                                     
       OPTION MSGDDN=DFSMSG,LIST,MSGPRT=ALL,RESINV=0,SORTDD=CNT2,SORTIN=TEMPFL*
                      E2,DYNALLOC                                               
        SORT FIELDS=COPY                                                       
       RECORD TYPE=V                                                           
201I 0 RECORD TYPE IS V - DATA STARTS IN POSITION 5                             
150I 0 VLSHRT NOT USED FOR SORT, MERGE, INCLUDE, OMIT OR SUM STATEMENT FIELDS   
[color=red]126A 9 INCONSISTENT REPORTFL IFTHEN 1 REFORMATTING FIELD [/color]FOUND                 
751I 0 C5-K05352 C6-Q95214 C7-K90000 C8-K05352 E9-K06751 E7-K90000             
052I 3 END OF DFSORT                                                           


Works fine if changed from IFTHEN BUILD to OUTREC as below
Code:
  OUTFIL FNAMES=OUTVSAM,OUTREC=(RDW,5:21)                 
  OUTFIL FNAMES=REPORTFL,CONVERT,INCLUDE=(5,1,CH,EQ,C'1'),
*        IFTHEN=(WHEN=(REC_TYP,EQ,C'00'),                 
*          BUILD=(21,18,OC_ORIG,OC_CURR,O_C,PRE_ADV)),     
         OUTREC=(21,18,30:X)                               
/*                                                         


Any help is appreciated.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Mar 22, 2006 11:31 pm
Reply with quote

CONVERT cannot be specified with IFTHEN or OVERLAY. It can only be specified with BUILD (or OUTREC).
Back to top
View user's profile Send private message
marpana

New User


Joined: 10 Jun 2005
Posts: 13
Location: London, UK

PostPosted: Wed Mar 22, 2006 11:43 pm
Reply with quote

I think I found the cause of the error. The syntax for OUTFIL below suggests that CONVERT/VTOF can only be used with OUTREC and not with IFTHEN.

Code:

____OUTREC=___________________________________________________________
           |  |_BUILD=(items)_|      |_,VTOF____|  |_,VLFILL=byte_|  |
           |                         |_,CONVERT_|                    |
           |                                                         |
           |__OVERLAY=(items)________________________________________|
           |                                                         |
           |__IFTHEN=(clause)________________________________________|
                                 |_IFOUTLEN=n_|


Does that mean if using IFTHEN in OUTFIL with variable length input then output dataset needs to be variable length as well? .
The code worked with IFTHEN when changed OUTFIL to remove CONVERT and add RDW.
Code:
  OUTFIL FNAMES=OUTVSAM,OUTREC=(RDW,5:21)               
  OUTFIL FNAMES=REPORTFL,INCLUDE=(5,1,CH,EQ,C'1'),     
*        IFTHEN=(WHEN=(REC_TYP,EQ,C'00'),               
*          BUILD=(21,18,OC_ORIG,OC_CURR,O_C,PRE_ADV)), 
         IFTHEN=(WHEN=INIT,BUILD=(1,4,21,18))           
/*                                                     


Is it not possible to get fixed length o/p record using IFTHEN of OUTFIL?.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Mar 23, 2006 12:12 am
Reply with quote

Quote:
I think I found the cause of the error. The syntax for OUTFIL below suggests that CONVERT/VTOF can only be used with OUTREC and not with IFTHEN.


Yes, that's what I said in my post above yours. I guess you missed it.

Quote:
Does that mean if using IFTHEN in OUTFIL with variable length input then output dataset needs to be variable length as well? .


Yes.

Quote:
Is it not possible to get fixed length o/p record using IFTHEN of OUTFIL?.


You can't go from variable input to fixed output directly when using IFTHEN. You can use IFTHEN in one step (or ICETOOL operator) and CONVERT with OUTREC in another step (or ICETOOL operator) to go from VB to FB.
Back to top
View user's profile Send private message
marpana

New User


Joined: 10 Jun 2005
Posts: 13
Location: London, UK

PostPosted: Thu Mar 23, 2006 11:04 pm
Reply with quote

Thank you for clarification Frank. That information helps.
Sorry I missed your earlier response.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Mar 23, 2006 11:19 pm
Reply with quote

I looked back at your example again and I don't understand why you need IFTHEN in the OUTFIL statement. You have

IFTHEN=(WHEN=INIT,BUILD=(21,18,30:X))

in your OUTFIL statement. This does the BUILD for every record, so it's the same as just using:

BUILD=(21,18,30:X)

without IFTHEN in which case you can use CONVERT. If this was just a simple example of something else you're actually trying to do with IFTHEN, show me what it is and I may be able to show you how to do it using IFTHEN in INREC or OUTREC rather than in OUTFIL so you can use CONVERT with OUTFIL.
Back to top
View user's profile Send private message
marpana

New User


Joined: 10 Jun 2005
Posts: 13
Location: London, UK

PostPosted: Fri Mar 24, 2006 10:33 pm
Reply with quote

I did feel that example may get you wondering :-).
I gave the simpler example just for illustration purpose.
I am actually implementing a requirement to transform data in a variable length KSDS VSAM file and create report of the transformed records.
As suggested by you in a different post, I am tagging the changed records and writing them to report file using the include parameter.
But I also need to write the record key and new values of the changed fields to the report file so I can then use them to display in the report.
Now the file consists of different types of records and based on the type of record I need to write fields from different locations. So in the OUTFIL of report file , i will need to use IFTHEN BUILD to take input fields from different positions based on record type.
Since I am creating both the output file and reportfile in same step, I will not be able to use outrec as it will affect records going to both files??( Please correct if i am wrong)

It is fine if report file needs to be treated as variable file in this case, as the only extra effort is to take care of RDW everywhere when handling the report file. can treat it as fixed length file with RDW ( since all the records are going to be same length).

Attaching code in case you wish to take a look. Sorry for the length of it. CNT2CNTL is the control card with OUTFIL at the end.

Code:
//TOOLIN   DD *                                                     
 COPY FROM(INVSAM) TO(TEMPFLE1) USING(CNT1) VSAMTYPE(V)           
 SPLICE FROM(TEMPFLE1) TO(TEMPFLE2) ON(TRN_REF) WITHALL WITH
  (RDW) WITH(INREC) KEEPNODUPS KEEPBASE VLENOVLY                   
  COPY FROM(TEMPFLE2) USING(CNT2) VSAMTYPE(V)                       
/*                                                                 
//CNT1CNTL DD *                                                     
  OUTFIL FNAMES=TEMPFLE1,                                           
         IFTHEN=(WHEN=INIT,BUILD=(RDW,C'0',9X,15:526,6,21:5)),     
         IFTHEN=(WHEN=(REC_TYP,EQ,C'00',AND,TENOR,EQ,C'S  '),       
                 OVERLAY=(6:IMS,ESU,ESC)),                         
         IFTHEN=(WHEN=(REC_TYP,EQ,C'00',AND,TENOR,NE,C'S  '),       
                 OVERLAY=(6:IMT,ETU,ETC))                           
/*                                                                 
//CNT2CNTL DD *                                                     
  OPTION EQUALS                                                     
* RECORD TYPE = 00                                                 
  INREC IFTHEN=(WHEN=(REC_TYP,EQ,C'00',AND,LOCAT,EQ,MANCTY, -   
              AND,(OC_ORIG,EQ,LISTC,OR,OC_CURR,EQ,LISTC)),
           OVERLAY=(5:C'1',                                       
           514:OC_ORIG,CHANGE=(3,DIC,IMST,UIC,ESTU,UTC,ESTU,       
                        CIC,ESTC,CTC,ESTC),NOMATCH=(OC_ORIG),     
           517:OC_CURR,CHANGE=(3,DIC,IMST,UIC,ESTU,UTC,ESTU,       
                        CIC,ESTC,CTC,ESTC),NOMATCH=(OC_CURR))),
* RECORD TYPE = 01                                                 
   IFTHEN=(WHEN=(REC_TYP,EQ,C'01',AND,LOCAT01,EQ,MANCTY, -         
             AND,(AMEND_OC,EQ,DIC,OR,PRE_OBL,EQ,DIC)),             
           OVERLAY=(5:C'1',                                       
           98:AMEND_OC,CHANGE=(3,DIC,IMST,UIC,ESTU,UTC,ESTU,       
                        CIC,ESTC,CTC,ESTC),NOMATCH=(AMEND_OC),     
          583:PRE_OBL,CHANGE=(3,DIC,IMST,UIC,ESTU,UTC,ESTU,       
                       CIC,ESTC,CTC,ESTC),NOMATCH=(PRE_OBL))),     
* RECORD TYPE = 05                                                 
   IFTHEN=(WHEN=(REC_TYP,EQ,C'05',AND,LOCAT,EQ,MANCTY, -         
             AND,OB_CL_CD,EQ,DIC),                                 
           OVERLAY=(5:C'1',                                       
          170:OB_CL_CD,CHANGE=(3,DIC,IMST,UIC,ESTU,UTC,ESTU,       
                       CIC,ESTC,CTC,ESTC),NOMATCH=OB_CL_CD))),             

*  FEW MORE RECORD TYPES and CONDITIONS ------

*                                                         
  OUTFIL FNAMES=OUTVSAM,OUTREC=(RDW,5:21)                 
  OUTFIL FNAMES=REPORTFL,INCLUDE=(5,1,CH,EQ,C'1'),         
         IFTHEN=(WHEN=(REC_TYP,EQ,C'00'),                 
           BUILD=(1,4,21,18,OC_ORIG,OC_CURR)),
         IFTHEN=(WHEN=(REC_TYP,EQ,C'01'),                 
           BUILD=(1,4,21,18,AMEND_OC,PRE_OBL)),

                 ***  FEW MORE RECORD TYPES HERE ***
               
/*                                                         


Your suggestions are appreciated. Let me know if I am not clear enough.
Since DFSORT is there I dont have to write a big COBOL program to achieve this.
Is there a limit on the input filesize to DFSORT?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Mar 24, 2006 11:38 pm
Reply with quote

Quote:
Since I am creating both the output file and reportfile in same step,
I will not be able to use outrec as it will affect records going to
both files??( Please correct if i am wrong)


Yes, that's true. There might be a way to reduce the number of passes by making what you do in the INREC IFTHENs more complex, but it's probably not worth worrying about.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top