View previous topic :: View next topic
|
Author |
Message |
Karthigaiselvan
New User
Joined: 11 Dec 2006 Posts: 35 Location: India
|
|
|
|
Hi,
I have a number of GDG files. Now I have a requirement to space-out a particular field in some records (selection of such records is apart) in all files.
For Eg:
My file contains credit card number field starting at 5th byte with length of 16. Now the portion (5-21) needs to be spaced out.
This has to be done for multiple records in a file & in multiple files too. So i am going for a JCL. But i am not clear with the approach. Please help. |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
Karthigaiselvan
This code replaces the data in the column 5 followed by 16 positions by SPACES.
Code: |
//*******************************************************
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=i/p file
//SORTOUT DD DSN=o/p file
//SYSIN DD *
SORT FIELDS=COPY
OUTREC OVERLAY=(5:C' ')
|
If you want to "include" only particular records you need to use INCLUDE condition in your sort card.
For Better suggestions post a sample set i/p and o/p records. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
OUTREC OVERLAY=(5:C' ') |
An easier way to do this is with this DFSORT statement:
Code: |
OUTREC OVERLAY=(5:16X)
|
|
|
Back to top |
|
|
Karthigaiselvan
New User
Joined: 11 Dec 2006 Posts: 35 Location: India
|
|
|
|
Thanks for the replies. But i dont want to create new output files by applying a SORT. I just want to have that space-out in the input file it self (meaning editing the files in a JCL). This is basically for a Compliance Audit for which we have to space-out the credit card numbers in our databases, files, etc. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Amd a "Software Professional"......Lord help us..... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
But i dont want to create new output files by applying a SORT. I just want to have that space-out in the input file it self |
What business reason is there that the audit not be run from a copy of the original data?
I believe you will create many problems if you "space out" the majority of the credit card number in your files (unless they are already working copies of the "real" files).
How large are these files? If they are modest in size and are on dasd, you could do what you want using tso/ispf edit in batch using "JCL".
Quote: |
This is basically for a Compliance Audit for which we have to space-out the credit card numbers in our databases, files, etc.
|
What good will these databases, files, etc be with the credit card numbers destroyed? I would think that there were business and legal reasons to preserve these |
|
Back to top |
|
|
|