Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
Auryn

New User

Joined: 11 Jan 2006
Posts: 53
Location: Lower Saxony (DE)

Posted: Fri Apr 28, 2006 4:40 pm    Post subject: Lots of IF-Clauses

I know how to use IF-statements in JCL. And I also know how to combine conditions by logical operators AND or OR.
But what can I do if there are so many conditions that one line is noch enough? Can I split all the conditions in two lines?
i.e.
 Code: //NODATA   IF (X010.S010.RC = 0 AND                X020.S010.RC = 0 AND                X030.S010.RC = 0 AND                X040.S010.RC = 0 AND                X050.S010.RC = 0 AND                X060.S010.RC = 0    ) //         THEN //*
...
 Code: //* //NODATA   ENDIF

The result of this are some errors:
 Code: IEFC621I EXPECTED CONTINUATION NOT RECEIVED IEFC019I MISPLACED DD STATEMENT IEFC605I UNIDENTIFIED OPERATION FIELD

Is the only thing I can do to code severel IF-Statements like
 Code: //IF1      IF (X010.S010.RC = 0) THEN //IF2      IF (X020.S010.RC = 0) THEN //IF3      IF (X030.S010.RC = 0) THEN //IF4      IF (X040.S010.RC = 0) THEN //IF5      IF (X050.S010.RC = 0) THEN //IF6      IF (X060.S010.RC = 0) THEN //*
...
 Code: //* //IF6   ENDIF //IF5   ENDIF //IF4   ENDIF //IF3   ENDIF //IF2   ENDIF //IF1   ENDIF

Thank you all for your help

priyesh.agrawal

Senior Member

Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

Posted: Fri Apr 28, 2006 6:11 pm    Post subject: Re: Lots of IF-Clauses

 Code: //NODATA   IF (X010.S010.RC = 0) AND //             (X020.S010.RC = 0) AND //             (X030.S010.RC = 0) AND //             (X040.S010.RC = 0) AND //             (X050.S010.RC = 0) AND //             (X060.S010.RC = 0) THEN //          // //ENDNODATA         ENDIF

Regards,
Priyesh.
Auryn

New User

Joined: 11 Jan 2006
Posts: 53
Location: Lower Saxony (DE)

 Posted: Fri Apr 28, 2006 6:28 pm    Post subject: phantastic, TYPRUN=SCAN works. Thanks a lot for the immediate help
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics 2 Where clauses inside a query in Cob... gch77 DB2 12 Fri Jul 18, 2014 10:26 am query on comp-3 and comp usage clauses sandy mf COBOL Programming 6 Thu Jun 21, 2012 10:00 pm File AID displaying two PICTURE claus... ganna_f16 Compuware & Other Tools 10 Thu Aug 18, 2011 2:53 pm RACF - anyone here has lots of experi... expat JCL & VSAM 13 Mon Jun 06, 2011 12:30 am FD clauses and DCB parameter lee_issc COBOL Programming 4 Thu Mar 10, 2011 1:14 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us