|
View previous topic :: View next topic
|
| Author |
Message |
Gopalakrishnan V
Active User
Joined: 28 Jun 2010 Posts: 102 Location: chennai
|
|
|
|
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 |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
| Please have a look at the File-Aid Manuals, there are some good examples to drive what you want to do. |
|
| Back to top |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
| 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 |
|
 |
PeterHolland
Global Moderator

Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
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 |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
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 |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
| Chapter 4.16 of the File Aid/MVS Batch Reference Manual gives examples of using the ELSE statement. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|