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

How to edit a portion of a record in file in JCL?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Karthigaiselvan

New User


Joined: 11 Dec 2006
Posts: 35
Location: India

PostPosted: Thu Aug 30, 2007 12:13 am
Reply with quote

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

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Aug 30, 2007 1:15 pm
Reply with quote

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

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Aug 31, 2007 4:25 am
Reply with quote

Quote:
OUTREC OVERLAY=(5:C' ')


An easier way to do this is with this DFSORT statement:

Code:

    OUTREC OVERLAY=(5:16X)
Back to top
View user's profile Send private message
Karthigaiselvan

New User


Joined: 11 Dec 2006
Posts: 35
Location: India

PostPosted: Sun Sep 02, 2007 10:34 pm
Reply with quote

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

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Mon Sep 03, 2007 1:35 am
Reply with quote

Amd a "Software Professional"......Lord help us.....
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: Mon Sep 03, 2007 2:42 am
Reply with quote

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 icon_confused.gif
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
Search our Forums:

Back to Top