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

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


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Oct 17, 2008 6:00 pm
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Oct 17, 2008 7:48 pm
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
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: 1702
Location: Australia

PostPosted: Wed Oct 22, 2008 5:32 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top