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
 

 

Sort card to override chars in VB file whn condition satisfy

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Sort card to override chars in VB file whn condition satisfy
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 Moderator


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

PostPosted: Mon Feb 09, 2009 10:43 pm    Post subject:
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    Post subject: Reply to: Sort card to override chars in VB file whn conditi
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 Moderator


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

PostPosted: Tue Feb 10, 2009 12:06 am    Post subject:
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    Post subject: Reply to: Sort card to override chars in VB file whn conditi
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 Moderator


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

PostPosted: Tue Feb 10, 2009 12:21 am    Post subject:
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

Site Director


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

PostPosted: Tue Feb 10, 2009 12:22 am    Post subject: Reply to: Sort card to override chars in VB file whn conditi
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 Moderator


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

PostPosted: Tue Feb 10, 2009 12:27 am    Post subject: Reply to: Sort card to override chars in VB file whn conditi
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    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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am


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