Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
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: 8201
Location: Dubuque, Iowa, 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: 8201
Location: Dubuque, Iowa, 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 ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts CA Intertest Batch 555shanth CA Products 0 Tue Nov 28, 2017 11:10 am
No new posts How to query MAXGENS of an existing P... Chuchulo Hatyzak JCL & VSAM 4 Wed Nov 22, 2017 10:23 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us