Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
ICETOOL error - ICE126A

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: ICETOOL error - ICE126A
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 Moderator


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

PostPosted: Wed Mar 22, 2006 11:31 pm    Post subject:
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    Post subject: Re: ICETOOL error - ICE126A
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 Moderator


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

PostPosted: Thu Mar 23, 2006 12:12 am    Post subject:
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    Post subject: Re: ICETOOL error - ICE126A
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 Moderator


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

PostPosted: Thu Mar 23, 2006 11:19 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Fri Mar 24, 2006 11:38 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm
No new posts Reply MQ open error Vignesh Sid COBOL Programming 5 Thu Sep 07, 2017 6:02 pm
No new posts Error in SQL-PLIST3 'Above value tru... rikdeb DB2 4 Wed Sep 06, 2017 1:34 pm
No new posts WER268A OUTREC STATEMENT : SYNTAX E... frozenblood87 SYNCSORT 12 Sat Aug 26, 2017 9:45 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us