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
 

 

Change multiple specific locations

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Uday Kumar R

New User


Joined: 07 Nov 2007
Posts: 25
Location: Mumbai

PostPosted: Mon Jun 18, 2012 1:22 pm    Post subject: Change multiple specific locations
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10255
Location: italy

PostPosted: Mon Jun 18, 2012 1:37 pm    Post subject: Reply to: Change multiple specific locations
Reply with quote

see here... for example
http://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

Moderator


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

PostPosted: Mon Jun 18, 2012 1:57 pm    Post subject:
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

Moderator


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

PostPosted: Mon Jun 18, 2012 2:41 pm    Post subject:
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: 25
Location: Mumbai

PostPosted: Mon Jun 18, 2012 5:11 pm    Post subject:
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    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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm


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