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

Editing dataset inside JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
aurora58

New User


Joined: 02 Aug 2005
Posts: 2

PostPosted: Tue Aug 02, 2005 8:34 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Aug 03, 2005 12:21 am
Reply with quote

- 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
View user's profile Send private message
die7nadal

Active User


Joined: 23 Mar 2005
Posts: 156

PostPosted: Wed Aug 03, 2005 12:21 am
Reply with quote

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
View user's profile Send private message
aurora58

New User


Joined: 02 Aug 2005
Posts: 2

PostPosted: Wed Aug 03, 2005 2:48 pm
Reply with quote

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
View user's profile Send private message
rajakumar10

New User


Joined: 03 Aug 2005
Posts: 12

PostPosted: Wed Aug 03, 2005 4:19 pm
Reply with quote

Is it any particular field/column you have problem with?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Aug 03, 2005 7:56 pm
Reply with quote

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
View user's profile Send private message
vinu

New User


Joined: 03 Jul 2005
Posts: 9

PostPosted: Thu Aug 04, 2005 7:04 pm
Reply with quote

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
View user's profile Send private message
Prandip

New User


Joined: 04 Mar 2005
Posts: 84
Location: In my tiny cubicle ...

PostPosted: Sat Aug 06, 2005 1:53 am
Reply with quote

Take a look at this IBM bulletin:

www-1.ibm.com/servers/storage/support/software/sort/mvs/beyond_sorting/online/srtmbgen.html
Back to top
View user's profile Send private message
vijayamadhuri

Active User


Joined: 06 Apr 2005
Posts: 180

PostPosted: Sat Aug 06, 2005 3:43 am
Reply with quote

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
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
Search our Forums:

Back to Top