View previous topic :: View next topic
|
Author |
Message |
John Howard
New User
Joined: 03 Aug 2007 Posts: 27 Location: Florida
|
|
|
|
I need to reformant a VB input record and produce a VB output with a field deleted and all bytes in the variable portion changed to a "." if <= x'40'. The input record has three parts. The first 81 bytes are to be copied to the output record as is. The next 36 bytes are to be ignored. The remainder of the record is the variable portion and is to be copied to the output following the 81 bytes already copied and any character <= x'40' changed to x'4B'. I am using the follwoing to create the output record:
SORT FIELDS=(COPY)
OUTFIL FILES=1,OUTREC=(1:1,4,5:5,81,86:117)
but I can't figure how to do the replacement.
Help!
TIA,
John |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Very First question I'd like to ask is - what sort product are you using? If it's SyncSort, what release of it is in use at your shop?
ALTSEQ and/or FINDREP could be of use (please search the forum on these key-words), however, we might need to look (for your specifc problem) and supply how many values would qualify for "<= x'40'"? |
|
Back to top |
|
|
John Howard
New User
Joined: 03 Aug 2007 Posts: 27 Location: Florida
|
|
|
|
I'm using SyncSort R130. The input record may be from about 100 characters to about 2,500 characters. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
How did the values less than x'40' originate? These aren't by chance packed-decimal or binary values? What about other hex values that do not display?
Just trying to understand the data content that could be "improved" by changing interspersed <x'40' values to x'4B'. . . |
|
Back to top |
|
|
John Howard
New User
Joined: 03 Aug 2007 Posts: 27 Location: Florida
|
|
|
|
The ultimate source of the data is the IMS x'01' and x'03' records from the System Log Data Set. These records represent IMS messages and contain many unprintable (hex) characters. The hex values are usually parts of fields that tell IMS (and me) how to reconstruct and track a particular message.
User ID, terminal ID, transaction name, date/time, message sequence number, screen image, and other fields are extracted from these records and written to a file with comma delimiters. When misuse of the system by a user is suspected, all records for that user are extracted from the file and downloaded to be reviewed on the auditor's PC, usually in Excel. Hex values below x'40' render some pretty ugly records, and worst of all, contain values that the PC interprets as carriage return, line feed, new line, etc. thus causing a single record to be broken down into multiple lines. While nonprintable characters above x'40' do remain, they do not impact the audit, and I would like to keep the data as pristine as possible for legal purposes.
I want to use SYNCSORT to remove the fields in the record that the auditor does not need to see (and contain most of the offending bytes) and process the remaining record to make sure that there are not any bytes that the PC will misinterpret. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
Back to top |
|
|
John Howard
New User
Joined: 03 Aug 2007 Posts: 27 Location: Florida
|
|
|
|
Dick – your reference showed me how to do what I need to do – thanks. I went back to the manual and reread ALTSEQ and I still can’t find it telling me that ALTSEQ will REPLACE characters. I guess that is between the lines.
Peter – I use DFSERA10 often and don’t see how it can perform this function. Am I missing something?
Thanks to all,
John |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Quote: |
Peter – I use DFSERA10 often and don’t see how it can perform this function. Am I missing something?
|
I dont know if you are missing something. I was only guessing that DFSERA10 could make SLDS records readable without "control character like bytes". So after a bit of manupilating the output it could be processed
on a PC environment. |
|
Back to top |
|
|
John Howard
New User
Joined: 03 Aug 2007 Posts: 27 Location: Florida
|
|
|
|
Peter - I think that I have found everything I need in sort. Thanks anyway. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Hello John,
it was me a pleasure.
Cheers. |
|
Back to top |
|
|
|