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 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: 8151
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: 8151
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
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Generate public-private key in batch ... vasanthz All Other Mainframe Topics 3 Fri Sep 15, 2017 9:20 am
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm

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