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
 
Getting Error using IFTHEN with BUILD

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Thu Nov 29, 2007 9:25 pm    Post subject: Getting Error using IFTHEN with BUILD
Reply with quote

My input is the following 21 byte records:

Code:

#TSUSER  IS2394  0102
CICS010  $1XXX   0102
CICS647  PZCH3   0203
DFLTGRP1 IS2394  0102
QKMTBR   IS2394  0102


The 0102 records should output 3 records per 1 records of input. The 0203 record should output 1 record per 1 record of input. The output should be an 80 byte record. I have defined the COMBINE DD statement as FB,80,27920.

Code:

 AU IS2394
 RE IS2394   GROUP(#TSUSER )
 DU IS2394
 AU $1XXX
 RE $1XXX    GROUP(CICS010 )
 DU $1XXX
 CO PXCH3    GROUP(CICS647 )
 AU IS2394
 RE IS2394   GROUP(DFLTGRP1)
 DU IS2394
 AU IS2394
 RE IS2394   GROUP(QKMTBR  )
 DU IS2394
 


Here are the ICETOOL control cards I am attempting to use:

Code:

SORT FIELDS=COPY                                               
OUTFIL FNAMES=COMBINE,IFOUTLEN=80,                             
    IFTHEN=(WHEN=(18,4,CH,EQ,C'0203'),                         
    BUILD=(1:C' CO ',5:8,10,13:C' GROUP(',20:8,1,28:C')',       
          29:52C' ')),                                         
    IFTHEN=(WHEN=(18,4,CH,EQ,C'0102'),                         
    BUILD=(1:C' AU ',5:8,10,13:68C' ',/,                       
    1:C' RE ',5:8,10,13:C' GROUP(',20:8,1,28:C')',29:52C' ',/, 
    1:C' DU ',5:8,10,13:68C' '))                               


Here is the error message I am receiving.

Code:

ICE146I 0 END OF STATEMENTS FROM CTL3CNTL - PARAMETER LIST STATEMENTS FOLLOW   
          DEBUG NOABEND,ESTAE                                                   
          OPTION MSGDDN=DFSMSG,LIST,MSGPRT=ALL,RESINV=0,SORTDD=CTL3,SORTIN=TEMP2
                         SORTOUT=COMBINE,DYNALLOC                               
ICE201I E RECORD TYPE IS F - DATA STARTS IN POSITION 1                         
ICE126A 9 INCONSISTENT COMBINE  IFTHEN 2 REFORMATTING FIELD FOUND               
ICE751I 0 C5-K26318 C6-K90007 C7-K90000 C8-K23476 E9-K90007 E7-K24705           
ICE052I 3 END OF DFSORT                                                         


Any assistance would be greatly 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: Thu Nov 29, 2007 10:13 pm    Post subject:
Reply with quote

The error message is issued because you have overlapping output fields. For example:

BUILD=(1:C' AU ',5:8,10,13:68C' ',/

The second field starts at position 5 and ends at position 14, but you have 13: for the next output field which overlaps the previous field. It looks like you reversed the starting position and length for the second field - you specified 8,10 when you really wanted 10,8. You reversed 1,8 to 8,1 as well.

Here are simplied DFSORT control statements that will do what you want:

Code:

  SORT FIELDS=COPY                                               
  OUTFIL FNAMES=COMBINE,IFOUTLEN=80,                             
    IFTHEN=(WHEN=(18,4,CH,EQ,C'0203'),                           
      BUILD=(1:C' CO ',5:10,8,13:C' GROUP(',20:1,8,28:C')')),   
    IFTHEN=(WHEN=(18,4,CH,EQ,C'0102'),                           
      BUILD=(1:C' AU ',5:10,8,/,                                 
           1:C' RE ',5:10,8,13:C' GROUP(',20:1,8,28:C')',/,     
           1:C' DU ',5:10,8))                                   
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Thu Nov 29, 2007 11:28 pm    Post subject: Reply to: Getting Error using IFTHEN with BUILD
Reply with quote

The solution worked great.

Thank you very much.
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 Nov 29, 2007 11:44 pm    Post subject:
Reply with quote

Glad I could help.
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm

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