Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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
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 EXIT or RETURN cvnlynn CLIST & REXX 7 Wed Jul 19, 2017 2:50 am
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us