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

Processing multiple input GDG's


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

New User


Joined: 09 Jul 2008
Posts: 6
Location: Portland, Oregon

PostPosted: Tue Aug 26, 2008 10:43 pm
Reply with quote

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Aug 26, 2008 10:59 pm
Reply with quote

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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Aug 26, 2008 11:58 pm
Reply with quote

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

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Aug 27, 2008 12:20 am
Reply with quote

For GDG's there is both Generation and Version.
Back to top
View user's profile Send private message
Lisa Christina

New User


Joined: 09 Jul 2008
Posts: 6
Location: Portland, Oregon

PostPosted: Wed Aug 27, 2008 12:38 am
Reply with quote

Just what I was looking for...a perfect and efficient solution!

Thanks Enrico and all!
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 TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Multiple table unload using INZUTILB DB2 2
Search our Forums:

Back to Top