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

outrec character replacement


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
John Howard

New User


Joined: 03 Aug 2007
Posts: 27
Location: Florida

PostPosted: Wed May 12, 2010 7:15 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed May 12, 2010 8:34 pm
Reply with quote

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
View user's profile Send private message
John Howard

New User


Joined: 03 Aug 2007
Posts: 27
Location: Florida

PostPosted: Wed May 12, 2010 8:43 pm
Reply with quote

I'm using SyncSort R130. The input record may be from about 100 characters to about 2,500 characters.
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: Thu May 13, 2010 7:38 am
Reply with quote

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'. . . icon_confused.gif
Back to top
View user's profile Send private message
John Howard

New User


Joined: 03 Aug 2007
Posts: 27
Location: Florida

PostPosted: Thu May 13, 2010 5:03 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri May 14, 2010 9:00 am
Reply with quote

Hello,

Ah, the dread "below spaces" control characters . . .

Have a look here for an example of changing multiple hex values:
ibmmainframes.com/viewtopic.php?t=40850
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri May 14, 2010 10:18 am
Reply with quote

Maybe you can use the following link to preformat SLDS records :

publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.ims9.doc.urs/u3hprta.htm
Back to top
View user's profile Send private message
John Howard

New User


Joined: 03 Aug 2007
Posts: 27
Location: Florida

PostPosted: Fri May 14, 2010 8:30 pm
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri May 14, 2010 10:37 pm
Reply with quote

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
View user's profile Send private message
John Howard

New User


Joined: 03 Aug 2007
Posts: 27
Location: Florida

PostPosted: Fri May 14, 2010 10:52 pm
Reply with quote

Peter - I think that I have found everything I need in sort. Thanks anyway.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri May 14, 2010 11:00 pm
Reply with quote

Hello John,

it was me a pleasure.

Cheers.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Panvalet - 9 Character name - Issue c... CA Products 6
No new posts String has hex character need to conv... COBOL Programming 3
No new posts Output LREC based on specific character DFSORT/ICETOOL 22
No new posts question on Outrec and sort #Digvijay DFSORT/ICETOOL 20
No new posts Replacing character string in file th... JCL & VSAM 9
Search our Forums:

Back to Top