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

need help in IFTHEN - getting return code 16


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

New User


Joined: 03 Jan 2006
Posts: 3

PostPosted: Thu Jan 05, 2006 12:24 pm
Reply with quote

got a input file

abc2600000 03$000
abc2600000 03$000999999999999999
abc2600000 03$001
abc2600000 03$000001002003004005
abc2600000 03$002
abc2600000 03$111222333444555666

i need the output to be like the following

000 000999999999999999
001 000001002003004005
002 111222333444555666

the condition is only if the 4th position is 260 else omit the record

i tried with the splice and ifthen but i always end up with return code 16.
please throw some light on this
Back to top
View user's profile Send private message
Alain Benveniste

New User


Joined: 14 Feb 2005
Posts: 88

PostPosted: Thu Jan 05, 2006 7:38 pm
Reply with quote

Rameshm,

Here is the jcl that does what you want:
Code:

//STEP0001 EXEC PGM=ICETOOL
//DFSMSG   DD SYSOUT=*
//TOOLMSG  DD SYSOUT=*
//TOOLIN   DD *
  COPY FROM(IN) TO(OUT) USING(ICE0)
  SPLICE FROM(OUT) TO(OUTX) ON(81,5,ZD) WITH(5,76) USING(ICE1)
/*
//IN       DD *
ABC2600000 03$000
ABC2600000 03$000999999999999999
ABC2600000 03$001
ABC2600000 03$000001002003004005
ABC2600000 03$002
ABC2600000 03$111222333444555666
/*
//OUT      DD DISP=(NEW,DELETE,DELETE),
//            UNIT=SYSDA,
//            SPACE=(TRK,(1,1,0),RLSE),
//            DCB=(DSORG=PS,RECFM=FB,LRECL=86),
//            DSN=&&OUT
//OUTX     DD SYSOUT=*
//ICE0CNTL DD *
  OMIT COND=(4,3,CH,NE,C'260')
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,5,ZD,
                86:81,5,ZD,MOD,+2,EDIT=(T))),
        IFTHEN=(WHEN=(86,1,CH,EQ,C'1'),
                BUILD=(1:15,3,81:SEQNUM,5,ZD)),
        IFTHEN=(WHEN=(86,1,CH,EQ,C'0'),
                BUILD=(5:15,20,81:SEQNUM,5,ZD))
/*
//ICE1CNTL DD *
  OUTFIL FNAMES=OUTX,OUTREC=(1,80)
/*

Alain
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 run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
Search our Forums:

Back to Top