Hi,
I hv a flat file of variable length having records > than 20000.
Let me explain the file structure:
<Fixed part>+ <n* Variable parts>
Every record has a fixed part with n number of Variable parts extended after the fixed part.
Variable part is of 29 bytes(2+27)
2 bytes for variable part type and 27 bytes for information, so totally 29 bytes.
Record Layout For example..
FIXED PART-----------| VAR PART 1 | VAR PART 2 | VAR PART 3 |:::::::::
aaaaaaaaaaaaaaaaa|04bbbbbbbbbb|02cccccccccc|01eeeeeeeeee|
Variable part type will be any one of the following : 01,02,03,04,05,06
I want to mask the variable part having type '06' with XXXX. But that variable part may come any place...
Input file:
FIXED PART-----------| VAR PART 1 | VAR PART 2 | VAR PART 3 |:::::::::
aaaaaaaaaaaaaaaaa|06bbbbbbbbbb|02cccccccccc|01eeeeeeeeee|
qqqqqqqqqqqqqqqqq|04bbbbbbbbbb|06cccccccccc|01eeeeeeeeee|
wwwwwwwwwwwww|04bbbbbbbbbb|02cccccccccc|06eeeeeeeeee|
Output file should be as follows:
FIXED PART-----------| VAR PART 1 | VAR PART 2 | VAR PART 3 |:::::::::
aaaaaaaaaaaaaaaaa|06 XXXXXXXXX|02cccccccccc|01eeeeeeeeee|
qqqqqqqqqqqqqqqqq|04bbbbbbbbbb|06XXXXXXXX|01eeeeeeeeee|
wwwwwwwwwwwww|04bbbbbbbbbb|02cccccccccc|06XXXXXXXX|
In brief, the tool should search for '06' variable part and mask the next 27 bytes( information ) with XXXX.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
kayelan,
The structure of your records is not clear from your description.
What is the RECFM and LRECL of the input file?
What is the length of the fixed part? Is it always the same length (as implied by "the fixed part") or can it be different lengths? If the same length, what is that length? If different lengths, how do you know its length for each record?
Do you always have the same number of variable parts in every record, or can you have a different number of variable parts in different records?
If the same number, how many do you have? If different numbers, then what is the maximum number of variable parts (6?).
Fixed part always of 80 bytes. No. of variable parts differ in each record but each variable part will have same length of 29 bytes (2+27): First 2 bytes tell the variable part type(01,02,03,04,05,06...any one of these) and succeeding 27 bytes contain the corresponding information. Maximum expected variable parts - 5.
In that one variable part type 06 is mandatory and also comes only once in a record but its position varies from one record to another...
i.e.,
for first record it may come as 2nd variable part,
for second record, it may come as first variable part and so on
Fixed part: 80 bytes
Var type:2
var info 27
so (81:2), (110:2),(139:2)... contain variable part type(01,02,03,04,05,06...any one of these)
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
kayelan wrote:
RECFM=VB,LRECL=11075
Quote:
Fixed part always of 80 bytes. No. of variable parts differ in each record but each variable part will have same length of 29 bytes (2+27): First 2 bytes tell the variable part type(01,02,03,04,05,06...any one of these) and succeeding 27 bytes contain the corresponding information. Maximum expected variable parts - 5.
It seems we are having old SORT utility.. Can you check it .. I have pasted the error msg,
SYNCSORT FOR Z/OS 1.1DR TPF3A U.S. PATENTS: 4210961, 5117495 (C) 2002 SYN
z/OS 1.6.0
SYSIN :
OPTION COPY
INREC IFTHEN=(WHEN=(85,2,PD,EQ,006),
*
OVERLAY=(87:27C'X')),
IFTHEN=(WHEN=(114,2,PD,EQ,006),
OVERLAY=(116:27C'X')),
IFTHEN=(WHEN=(143,2,PD,EQ,006),
OVERLAY=(145:27C'X')),
IFTHEN=(WHEN=(172,2,PD,EQ,006),
OVERLAY=(174:27C'X')),
IFTHEN=(WHEN=(201,2,PD,EQ,006),
OVERLAY=(203:27C'X'))
WER903I SYNCSORT 1.1 TPF3A IS NOT LICENSED FOR SERIAL 21BF9, TYPE 2064 116, L
WER903I SYNCSORT 1.1 TPF3A IS NOT LICENSED FOR SERIAL 21BF9, TYPE 2064 116, L
WER903I SYNCSORT WILL STOP WORKING IN 45 DAYS UNLESS A VALID KEY IS INSTALLE
WER268A INREC STATEMENT : SYNTAX ERROR
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
kayelan,
The job I gave you works fine for 5 variable parts with DFSORT. But you're using Syncsort, not DFSORT. I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.
Fixed part+ n* Variable parts.
Every record has a fixed part with n number of Variable parts extended after the fixed part. Variable part is of 29 bytes(2+27)
This and your location in frankfurt, the Bankink-HQ of Germany, (same as mine) remainds me of some DTA-programms i wrote times ago. So if this problem has something to do with intertransfer between banks, plse send me a PM.