View previous topic :: View next topic
|
Author |
Message |
Lisa Christina
New User
Joined: 09 Jul 2008 Posts: 6 Location: Portland, Oregon
|
|
|
|
I have 44 GDG's and want to process each of those individually as input files through a COBOL program. I need to read each record in those 44 files to encrypt the account number and then rewrite the record with the new encryption info. I don't want new GDG's, just the same versions with converted data. And I don't want to submit the JCL 44 times either! (each file has approx. 10k records - record length is 1500)
Anyone have an idea for the best, most efficient way to accomplish this task with JCL? Examples please.
Thanks in advance. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
write a procedure ( inline ) and execute it 44 times...
Code: |
//jobname JOB .........
//ENCODE PROC
//encode EXEC PGM=Your_encoding_prog
//input_ddname DD DISP=SHR,DSN=your_gdg_name(&GEN)
//output_ddname DD DISP=(NEW,PASS),DSN=&&temp_dsn,
//... DD ...
//... DD ...
//replace EXEC PGM=copy_utilty_of_your_choice
//input_ddname DD DISP=(OLD,DELETE),DSN=&&temp_dsn
//output_ddname DD DISP=SHR,DSN=your_gdg_name(&GEN)
//... DD ...
//... DD ...
// PEND
//*
// EXEC ENCODE,GEN='-1'
// EXEC ENCODE,GEN='-2'
// EXEC ENCODE,GEN='...'
// EXEC ENCODE,GEN='-44'
|
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest if you write over the original files you make a copy of them first. If one of the replace steps should abend for any reason your file would be destroyed/corrupted. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
For GDG's there is both Generation and Version. |
|
Back to top |
|
|
Lisa Christina
New User
Joined: 09 Jul 2008 Posts: 6 Location: Portland, Oregon
|
|
|
|
Just what I was looking for...a perfect and efficient solution!
Thanks Enrico and all! |
|
Back to top |
|
|
|