|
View previous topic :: View next topic
|
| Author |
Message |
Mathiv Anan
Active User
Joined: 23 Jul 2008 Posts: 106 Location: USA
|
|
|
|
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 |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
 |
Mathiv Anan
Active User
Joined: 23 Jul 2008 Posts: 106 Location: USA
|
|
|
|
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 |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
| 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 |
|
 |
Mathiv Anan
Active User
Joined: 23 Jul 2008 Posts: 106 Location: USA
|
|
|
|
So, we cannot split an IF condition into two lines.
Thanks for your clarification Bob! |
|
| Back to top |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
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 |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|