MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Batch File-AID

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
krk123
Beginner


Joined: 03 Jun 2003
Posts: 58
Topics: 19

PostPosted: Wed Aug 06, 2003 8:58 am    Post subject: Batch File-AID Reply with quote

Hi,
I am using a batch file-aid to change the data in the input file at a particular location based on a condtion. Now I am using 2 files one input and the other output. Is there any way I can use only one file i.e. the input file alone. I want the data to be changed directly in the input file rather than creating the output file. Is it possible?

Code:

//STEP20 EXEC  PGM=FILEAID                                   
//SYSOUT   DD  SYSOUT=*                                       
//SYSPRINT DD  SYSOUT=*                                       
//DD01     DD  DISP=SHR,DSN=Sysuid.test.krk123
//DD01O    DD  DSN=Sysuid.test.krk123.afterfaid,
//             DISP=(NEW,CATLG,DELETE),                       
//             UNIT=TSH,SPACE=(CYL,(10,20),RLSE)             
//SYSIN    DD  *                                             
$$DD01 CA IF=(10,EQ,C'xxxxxxx '),                               
               REPL=(150,C'dddddddddddddddddddd')                 
/*
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Wed Aug 06, 2003 9:50 am    Post subject: Reply with quote

krk123,

File-aid lets you code the input file as output also.But Let me warn you whenever you are trying to do update in place , there is a chance of losing the data if something goes wrong.Make sure that you have a backup of the input.
Code:

//STEP20   EXEC PGM=FILEAID
//SYSOUT   DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//DD01     DD DISP=SHR,DSN=Sysuid.test.krk123
//DD01O    DD DSN=Sysuid.test.krk123,DISP=OLD
//SYSIN    DD *
$$DD01 CA IF=(10,EQ,C'xxxxxxx '),
REPL=(150,C'dddddddddddddddddddd')
/*


Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
krk123
Beginner


Joined: 03 Jun 2003
Posts: 58
Topics: 19

PostPosted: Wed Aug 06, 2003 2:40 pm    Post subject: Reply with quote

Thanks Kolusu....
Regards,
Anil.
Back to top
View user's profile Send private message
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Mon Feb 09, 2009 6:27 am    Post subject: Reply with quote

Hi, Kolusu.

Is using same file as input and output allowed by SORT?

Thanks.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Mon Feb 09, 2009 11:55 am    Post subject: Reply with quote

mf_user,

Please SEARCH before posting. check this link

http://www.mvsforums.com/helpboards/viewtopic.php?p=7572#7572
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Tue Feb 10, 2009 4:22 am    Post subject: Reply with quote

Thanks Kolusu.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group