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
 
How can we use else condition in file aid control card?

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

Active User


Joined: 28 Jun 2010
Posts: 102
Location: chennai

PostPosted: Thu Sep 20, 2012 11:17 am    Post subject: How can we use else condition in file aid control card?
Reply with quote

Hi,

I need to update a file using file aid in batch mode. in that few conditions have to check before update.
if first set of condition true then the field at 39th position changed from 1 into 2. if first set of condition true then the field at 39th position changed from 1 into 3.
but in both the cases few conditions are similar the fields started from 3,9,17. only the field sarted from 27 varies one case it should not be 1 and 3 and 7 but for other case it should be 1 or 3 or 7.


Code:

$$DD01 UPDATEALL IF=(3,EQ,P'10'),   
                 IF=(9,EQ,C'2'),       
                 IF=(17,NE,C'0147'),
                 IF=(27,NE,P'1',17,NE,P'3',17,NE,P'7'),
                 REPL=(39,EQ,P'1',P'2')     
$$DD01 UPDATEALL IF=(3,EQ,P'10'),   
                 IF=(9,EQ,C'2'),       
                 IF=(17,NE,C'0146000'),
                 IF=(27,EQ,P'1',17,EQ,P'3',17,EQ,P'7'),
                 REPL=(39,EQ,P'1',P'3')
     


I used above control cards. first update working fine but while executing second updateall it showing like INPUT FILE IS ALREADY AT EOD.

I am not much aware of this file aid cards so please correct my code ( like else syntax)

Please share the link for the file aid manual control cards


Thanks in advance.
Back to top
View user's profile Send private message

Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Sep 20, 2012 11:50 am    Post subject:
Reply with quote

Please have a look at the File-Aid Manuals, there are some good examples to drive what you want to do.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1868
Location: UK

PostPosted: Thu Sep 20, 2012 12:54 pm    Post subject:
Reply with quote

Quote:
Please share the link for the file aid manual control cards

I think you have been here long enough to know that this is an invalid request. Manuals are copyrighted and may not be shared freely. IBM makes its manuals available freely but other companies do not. If you have the software, legally, then you have, somewhere, the manuals. And, what is wrong with the help key on your keyboard - or are you just too lazy to use it?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2441
Location: Netherlands, Amstelveen

PostPosted: Thu Sep 20, 2012 1:11 pm    Post subject:
Reply with quote

You could try this :


Code:

//DD01  DD DSN=your dataset,DISP=SHR
//DD02  DD DSN=your dataset,DISP=SHR


$$DD01 UPDATEALL
$$DD02 UPDATEALL
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Sep 21, 2012 4:05 am    Post subject: Reply to: How can we use else condition in file aid control
Reply with quote

Hi,

or try this
Code:
$$DD01 UPDATEALL IF=(3,EQ,P'10'),   
                 IF=(9,EQ,C'2'),       
                 IF=(17,NE,C'0147'),
                 IF=(27,NE,P'1',17,NE,P'3',17,NE,P'7'),
                 REPL=(39,EQ,P'1',P'2'),     
                 IF=(3,EQ,P'10'),   
                 IF=(9,EQ,C'2'),       
                 IF=(17,NE,C'0146000'),
                 IF=(27,EQ,P'1',17,EQ,P'3',17,EQ,P'7'),
                 REPL=(39,EQ,P'1',P'3')



Gerry
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 Sep 21, 2012 10:18 pm    Post subject:
Reply with quote

Chapter 4.16 of the File Aid/MVS Batch Reference Manual gives examples of using the ELSE statement.
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 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
No new posts editting the file by inserting zeros ... pramodrsingh DFSORT/ICETOOL 9 Mon Aug 21, 2017 5:58 pm
No new posts Changing sort Card Dynamically vickey_dw DFSORT/ICETOOL 5 Sat Aug 19, 2017 2:33 pm

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