Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
need help in IFTHEN - getting return code 16

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
Author Message
rameshm

New User


Joined: 03 Jan 2006
Posts: 3

PostPosted: Thu Jan 05, 2006 12:24 pm    Post subject: need help in IFTHEN - getting return code 16
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
References
Alain Benveniste

Active User


Joined: 14 Feb 2005
Posts: 90

PostPosted: Thu Jan 05, 2006 7:38 pm    Post subject:
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1