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
 
need help in IFTHEN - getting return code 16

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

Alain Benveniste

New User


Joined: 14 Feb 2005
Posts: 88

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
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 IBEGENER RETURN CODE 12 anilkumar922 All Other Mainframe Topics 4 Wed Dec 13, 2017 11:41 am
No new posts Finding the plan when code compiled u... Ahemad DB2 1 Fri Dec 01, 2017 6:38 pm
No new posts Strange Code amitc23 COBOL Programming 6 Tue Nov 28, 2017 11:25 am
No new posts Speed-up/reduce CPU use of code prino PL/I & Assembler 0 Tue Sep 26, 2017 12:05 am
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm

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