IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How can we use else condition in file aid control card?


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
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
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

Superior Member


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

PostPosted: Thu Sep 20, 2012 11:50 am
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: 2455
Location: Hampshire, UK

PostPosted: Thu Sep 20, 2012 12:54 pm
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: 2477
Location: Netherlands, Amstelveen

PostPosted: Thu Sep 20, 2012 1:11 pm
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: 1702
Location: Australia

PostPosted: Fri Sep 21, 2012 4:05 am
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: 8584
Location: Dubuque, Iowa, USA

PostPosted: Fri Sep 21, 2012 10:18 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts Convert PS to TXT file using jcl JCL & VSAM 7
This topic is locked: you cannot edit posts or make replies. Sort to include records of file 2 int... Java & MQSeries 1
No new posts How to modify file content using REXX CLIST & REXX 3
No new posts VB file copy COBOL program gives erro... COBOL Programming 3
No new posts SORT for dynamic trailer record + CSV... DFSORT/ICETOOL 14
Search our Forums:

Back to Top