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 Usergroups 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: 1825
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: 2435
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: 8117
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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