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

Change multiple specific locations


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

New User


Joined: 07 Nov 2007
Posts: 27
Location: Mumbai

PostPosted: Mon Jun 18, 2012 1:22 pm
Reply with quote

Hi team,
I am trying to understand how multiple specific location updates with specific information, more or less like encryption format.

i have file with 20 bytes where it consist of 9-13 five digits with account information. so i would like to mask this account information every time.
so i have followed one dequece. Replace 1->a,2-b,3-c,4-d,5-e,6-f,7-g,8-h,9-i,0-j. Some thing encryption formation. so i need to do it for the coloumns 9,10,11,12,13. While i am trying to if then clause it works for one colunm and coming out, i need to replicate the same sort step for 5 times to do this. Is it possible to have in one step. This is what i have followed.

Code:
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(9,1,CH,EQ,C'1',),OVERLAY=(9:C'A')),
INREC IFTHEN=(WHEN=(9,1,CH,EQ,C'2',),OVERLAY=(9:C'B')),
INREC IFTHEN=(WHEN=(9,1,CH,EQ,C'3',),OVERLAY=(9:C'C')),
INREC IFTHEN=(WHEN=(9,1,CH,EQ,C'4',),OVERLAY=(9:C'D')),
INREC IFTHEN=(WHEN=(9,1,CH,EQ,C'5',),OVERLAY=(9:C'E')),
INREC IFTHEN=(WHEN=(9,1,CH,EQ,C'6',),OVERLAY=(9:C'F')),
INREC IFTHEN=(WHEN=(9,1,CH,EQ,C'7',),OVERLAY=(9:C'G')),
INREC IFTHEN=(WHEN=(9,1,CH,EQ,C'8',),OVERLAY=(9:C'H')),
INREC IFTHEN=(WHEN=(9,1,CH,EQ,C'9',),OVERLAY=(9:C'I'))).

Like wise i have done for column 10->13 steps by including each step for one parm. Is there any key words so that i can try more research to complete in a single STEP. thanks for all for giving a view this query.

INPUT (ONLY 10byes of input file i have written)
Code:
1111567890
2222678901
3333789012
4444890123


OUTPUT:
Code:
1111EFGHI0
2222FGHIJ1
3333GHIJA2
4444HIJAB3
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Jun 18, 2012 1:37 pm
Reply with quote

see here... for example
ibmmainframes.com/about38367.html

a DFSORT expert might come up with better suggestions
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Mon Jun 18, 2012 1:57 pm
Reply with quote

This might help

Code:
  SORT FIELDS=COPY
  OUTFIL FINDREP=(INOUT=(C'1',C'A',C'2',C'B',C'3',C'C',
                         C'4',C'D',C'5',C'E',C'6',C'F',
                         C'7',C'G',C'8',C'H',C'9',C'I',
                         C'0',C'J'),STARTPOS=9,ENDPOS=13)
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Mon Jun 18, 2012 2:41 pm
Reply with quote

Also looks like the syntax you used is wrong (atleast for me) due to duplicate INREC , and due to ,), and also due to ))) in the end
Back to top
View user's profile Send private message
Uday Kumar R

New User


Joined: 07 Nov 2007
Posts: 27
Location: Mumbai

PostPosted: Mon Jun 18, 2012 5:11 pm
Reply with quote

sorry for that, the INREC should not the there from second line onwards. But he proposed code help me lot. Thank you for all the help.
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Grouping by multiple headers DFSORT/ICETOOL 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
Search our Forums:

Back to Top