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

[Solved]Lots of IF-Clauses


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Auryn

New User


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

PostPosted: Fri Apr 28, 2006 4:40 pm
Reply with quote

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
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


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

PostPosted: Fri Apr 28, 2006 6:11 pm
Reply with quote

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.
Back to top
View user's profile Send private message
Auryn

New User


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

PostPosted: Fri Apr 28, 2006 6:28 pm
Reply with quote

TYPRUN=SCAN works.
Thanks a lot for the immediate help
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts 2 Where clauses inside a query in Cob... DB2 12
No new posts query on comp-3 and comp usage clauses COBOL Programming 6
No new posts File AID displaying two PICTURE claus... Compuware & Other Tools 10
No new posts RACF - anyone here has lots of experi... JCL & VSAM 13
No new posts FD clauses and DCB parameter COBOL Programming 4
Search our Forums:

Back to Top