View previous topic :: View next topic
|
Author |
Message |
aurora58
New User
Joined: 02 Aug 2005 Posts: 2
|
|
|
|
hi,
I need to know if we can edit a dataset in the same JCL where it is being created and populated and How. This is a sequential dataset and there is some possible corruption of data in it which I want to delete.
Is there any way other than the File Aid. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
- you could write a script to call the TSO EDIT editor and take a series of whatever steps you need.
- you could start TSO and ISPF services and invoke the ISPF EDIT editor along with an EDIT macro.
- you could use IDCAMS or DFSORT to update or delete or identify particular records based on some criteria. |
|
Back to top |
|
|
die7nadal
Active User
Joined: 23 Mar 2005 Posts: 156
|
|
|
|
U can do a host of things to edit a file write a program in any language like COBOL, C...or tools like SORT,IEBGENER. But it depends on what and how u want to edit. If you want to access the DS in the same Job then code the DISP status as SHR to share or MOD,OLD for exclusive access |
|
Back to top |
|
|
aurora58
New User
Joined: 02 Aug 2005 Posts: 2
|
|
|
|
Thanks for the reply. I at least have a clue as to where to be banging my head after this.
As for your questions, the data that i am talking about has some characters that are not being recognised by the systema nd are then represented as undefined characters. This file is then sent across places where it may be picked up by the Oracle server which then rejects this file because of these characters. I have to get rid of these characters.
Can I burden you with giving me a small batch job example to handle this edit.
Thanks anyway...you have been very helpful |
|
Back to top |
|
|
rajakumar10
New User
Joined: 03 Aug 2005 Posts: 12
|
|
|
|
Is it any particular field/column you have problem with? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
aurora58, you wanted a sample EDIT job:
Code: |
//STEP0001 EXEC PGM=IEFBR14
//DD1 DD DSN=&SYSUID..MYTEST.DATA,DISP=(MOD,DELETE,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(1,0))
//*
//STEP0002 EXEC PGM=ICEGENER
//SYSUT1 DD *
THIS IS TEST RECORD 01 OF 10 @@@@@@@@
THIS IS TEST RECORD 02 OF 10 @@@@@@@@
THIS IS TEST RECORD 03 OF 10 ########
THIS IS TEST RECORD 04 OF 10 ########
THIS IS TEST RECORD 05 OF 10 ========
THIS IS TEST RECORD 06 OF 10 ========
THIS IS TEST RECORD 07 OF 10 @@@@@@@@
THIS IS TEST RECORD 08 OF 10 @@@@@@@@
THIS IS TEST RECORD 09 OF 10 ########
THIS IS TEST RECORD 10 OF 10 $$$$$$$$
/*
//SYSUT2 DD DSN=&SYSUID..MYTEST.DATA,DISP=(,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
//STEP0003 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
EDIT MYTEST DATA
TOP
FIND '@@@@@@@@'
CHANGE * '@@@@@@@@' ''
TOP
FIND '@@@@@@@@'
CHANGE * '@@@@@@@@' ''
TOP
FIND '@@@@@@@@'
CHANGE * '@@@@@@@@' ''
TOP
FIND '@@@@@@@@'
CHANGE * '@@@@@@@@' ''
TOP
FIND '########'
CHANGE * '########' ''
TOP
FIND '########'
CHANGE * '########' ''
TOP
FIND '########'
CHANGE * '########' ''
END SAVE
TOP
FIND '$$$$$$$$'
CHANGE * '$$$$$$$$' ''
END SAVE
/*
//*
|
Of course, the TSO EDIT functions could be scripted. |
|
Back to top |
|
|
vinu
New User
Joined: 03 Jul 2005 Posts: 9
|
|
|
|
what functions can be done with the tool ICEGENER you have used in that JCL ?
I want to know some basics about many utilities.
Pls help,
vinu |
|
Back to top |
|
|
Prandip
New User
Joined: 04 Mar 2005 Posts: 84 Location: In my tiny cubicle ...
|
|
Back to top |
|
|
vijayamadhuri
Active User
Joined: 06 Apr 2005 Posts: 180
|
|
|
|
In THE JCL go the step where the dataset name is used and hightlight it and type E on the command prompt.
The datset will be open in the edit mode.U can make all the changes u need,save it and submit the job the job will run with the new data. |
|
Back to top |
|
|
|