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

Sort card to override chars in VB file whn condition satisfy


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

New User


Joined: 24 Nov 2008
Posts: 20
Location: Bangalore

PostPosted: Mon Feb 09, 2009 2:05 pm
Reply with quote

I want to override the first 12 characters of a 16 char length field in a VB file whenever it is superceded by something like 'PMT+1:'
For example,

whenever i find characters like 'PMT+1:1+CA:1111222233334444:' (which starts with a common sequence of characters 'PMT+1:' in a VB file, i need to replace the 6th to 17th columns of that string after the 'PMT+1:' with another character 'X'

Input = 'PMT+1:1+CA:1111222233334444'

Expected Output = 'PMT+1:1+CA:XXXXXXXXXXXX4444'

And i need to do this in a GDG file (VB) with 255 generations.
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: Mon Feb 09, 2009 10:43 pm
Reply with quote

The positions you mention do not agree with your example. First of all, a VB record has an RDW in positions 1-4, so the first data byte starts in position 5, not 1. You say you want to replace the 6th to 17th columns with X but in your example, that is NOT what you're replacing with X.

Please show your input record as it really looks (rrrr for RDW), e.g.

rrrr'PMT+1:1+CA:1111222233334444'

or

rrrrPMT+1:1+CA:1111222233334444

and indicate which positions you want to replace with X.
Back to top
View user's profile Send private message
RanjitRaveendran
Warnings : 1

New User


Joined: 24 Nov 2008
Posts: 20
Location: Bangalore

PostPosted: Mon Feb 09, 2009 11:45 pm
Reply with quote

Sorry, i forgot to mention that the string i gave as example is part of a record and does not always appear in a particular position in the whole input record. It varies but the sub-string 'PMT+1:...' follows a constant format. Hence i need to identify from the record the sub-string which would start with a format 'PMT+1:' and then inside the sub-string the starting from 6th to 17th position, i need to override by XXXX. like as in the example i provided earlier. I would like to know if the SORT extends such a facility to identify a string (regardless of where it appears in the record) and then override the following certain numerics at certain positions with 'X'. Below is the actual record where 'PMT+1:' is a sub-string of...

Credit Card Info Removed. . .
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: Tue Feb 10, 2009 12:06 am
Reply with quote

I see the following in your VB record:

'PMT+1:1+CA:1111222233334444

and I believe you want to replace it with:

'PMT+1:1+CA:XXXXXXXXXXXX4444

wherever it's found - right?

Does 1+CA: always follow 'PMT+1:?

If not, can anything be present instead of 1+CA:? Or can only a limited number of strings be present instead of 1+CA? If it's only a limited number of strings, what are they?
Back to top
View user's profile Send private message
RanjitRaveendran
Warnings : 1

New User


Joined: 24 Nov 2008
Posts: 20
Location: Bangalore

PostPosted: Tue Feb 10, 2009 12:12 am
Reply with quote

I see the following in your VB record:

'PMT+1:1+CA:1111222233334444

and I believe you want to replace it with:

'PMT+1:1+CA:XXXXXXXXXXXX4444

wherever it's found - right?---> YES that's right.

Does 1+CA: always follow 'PMT+1icon_confused.gif ---> No, it may be 1+VI or 1+AX or someother.

If not, can anything be present instead of 1+CA:? Or can only a limited number of strings be present instead of 1+CA? If it's only a limited number of strings, what are they? ---> PMT+1: would always be followed by limited no of characters. like 'PMT+1:1+VI:' or 'PMT+1:2+AX:' i.e though the alpanumeric values could change, the number of characters which follow would remain the same.
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: Tue Feb 10, 2009 12:21 am
Reply with quote

Quote:
PMT+1: would always be followed by limited no of characters. like 'PMT+1:1+VI:' or 'PMT+1:2+AX:' i.e though the alpanumeric values could change


In that case, this can't be done with DFSORT's built-in functions. FINDREP does not allow find and "replace with offset". I'd suggest writing a program or DFSORT exit to do it.
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: Tue Feb 10, 2009 12:22 am
Reply with quote

Sorry to interrupt, but posting credit card information will cease.

Ranjit,

Do not post this question (or anything similar) again.

We will not be responsible for your complete lack of professionalism. . .

d
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: Tue Feb 10, 2009 12:27 am
Reply with quote

Hmmm ... I didn't notice that. I removed that data.
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top