View previous topic :: View next topic |
Author |
Message |
krk123 Beginner

Joined: 03 Jun 2003 Posts: 58 Topics: 19
|
Posted: Wed Aug 06, 2003 8:58 am Post subject: Batch File-AID |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
Posted: Wed Aug 06, 2003 9:50 am Post subject: |
|
|
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 |
|
 |
krk123 Beginner

Joined: 03 Jun 2003 Posts: 58 Topics: 19
|
Posted: Wed Aug 06, 2003 2:40 pm Post subject: |
|
|
Thanks Kolusu....
Regards,
Anil. |
|
Back to top |
|
 |
mf_user Intermediate

Joined: 01 Jun 2003 Posts: 372 Topics: 105
|
Posted: Mon Feb 09, 2009 6:27 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
mf_user Intermediate

Joined: 01 Jun 2003 Posts: 372 Topics: 105
|
Posted: Tue Feb 10, 2009 4:22 am Post subject: |
|
|
Thanks Kolusu. _________________ MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
== |
|
Back to top |
|
 |
|
|