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
 

 

Continuation of IF condition in next line - File-Aid Batch

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools
View previous topic :: :: View next topic  
Author Message
Mathiv Anan

Active User


Joined: 23 Jul 2008
Posts: 106
Location: USA

PostPosted: Fri Oct 17, 2008 5:53 pm    Post subject: Continuation of IF condition in next line - File-Aid Batch
Reply with quote

Is there any way we can continue an IF condition in the next line in File-Aid batch control statement?

See the code sample:

Code:
$$DD01 COPY IF=(13,EQ,C'99'),
                      IF=(666,EQ,C'A,P,C,D,E,F,G,H,I,J,K,L,M,N,O,PQ,'),OUT=0


I have more criteria to be given in the second IF condition. Could you please let me know if I can continue it in the next line?

[/code]
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Fri Oct 17, 2008 6:00 pm    Post subject:
Reply with quote

From the File Aid Batch Manual:
Quote:
CHAP_2.1 Coding Conventions

Use the following conventions to code control cards:

* You can have information in location 1 through location 80 of your control cards.

* To specify a continuation line, code a comma after the last complete parameter entry on a control card.

* To code continuation cards, place a blank in location 1 and make sure the next parameter entry starts before location 26 of the card.

* Separate the function/dataset organization identifier and the parameter identifiers with at least one blank space.

* Do not split an individual parameter entry element between cards.

* You can code more than one parameter identifier following a single function/dataset organization identifier. The order that you code the parameters determines the logic of the statement.

* Separate multiple parameter identifiers by commas.

* You may code multiple parameter identifiers on a continuation line.

You can use abbreviations instead of full function, function modifier, or parameter names. For example, a control card with full names is coded as follows:

$$DD01 COPYALL REPL=(6,50,C'TEST',C'PROD')

In contrast, a control card using abbreviations is coded:

$$DD01 CA R=(6,50,C'TEST',C'PROD')
Back to top
View user's profile Send private message
Mathiv Anan

Active User


Joined: 23 Jul 2008
Posts: 106
Location: USA

PostPosted: Fri Oct 17, 2008 7:45 pm    Post subject:
Reply with quote

I used like this and still get errors.

Code:
$$DD01 COPY IF=(13,EQ,C'99'),
                      IF=(666,EQ,C'A,P,C,D,E,F,G,H,I,J,K,L,M,N,
                       O,PQ'),OUT=0




Did I misunderstand?

Can you help me?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Fri Oct 17, 2008 7:48 pm    Post subject:
Reply with quote

Code:
$$DD01 COPY IF=(13,EQ,C'99'),
      IF=(666,EQ,C'A,P,C,D,E,F,G,H,I,J,K,L,M,N,O,PQ'),
       OUT=0
should work. However, the IF cannot be split midways -- it is a single parameter.
Back to top
View user's profile Send private message
Mathiv Anan

Active User


Joined: 23 Jul 2008
Posts: 106
Location: USA

PostPosted: Fri Oct 17, 2008 10:39 pm    Post subject:
Reply with quote

So, we cannot split an IF condition into two lines.

Thanks for your clarification Bob!
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Wed Oct 22, 2008 5:32 am    Post subject:
Reply with quote

Hi,

you can always do this
Code:
$$DD01 COPY IF=(13,EQ,C'99'),                                   
           AND=(666,EQ,C'A,P,C,D,E,F,G,H,I,J,K,L,M,N,O,PQ,'),   
          ORIF=(13,EQ,C'99'),                                   
           AND=(666,EQ,C'B,2,3,4,5,6,G,7,8,9'),OUT=0             




Gerry
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 -> Compuware & Other Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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