Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to edit a portion of a record in file in JCL?
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    Post subject:
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 Moderator


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

PostPosted: Fri Aug 31, 2007 4:25 am    Post subject:
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    Post subject: Reply to: How to edit a portion of a record in file in JCL?
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: 2150
Location: At my coffee table

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

Amd a "Software Professional"......Lord help us.....
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Mon Sep 03, 2007 2:42 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us