Hi,

I wonder if anyone knows if I can achieve the following in SORT.  I've 
already done it in REXX but I think SORT may be more efficient since my 
input file has 92 records resulting in more than 30,000 records.

Each record is fixed (lrecl=8906) and is built as follows:

1-2    2-byte binary length
3-4    2-byte filler contains '00'x
5-11   Userid
12     Space
13-?   Username

This is then repeated across the record until we encounter a length of 
zero.

So a record containing 3 names (in reality they contain hundreds) would 
look like this:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+
    USR0001 FRED.SMITHY    USR0002 JEFFREY.SNOTRAG    USR0003 JOE.SCHMO
0100EEDFFFF4CDCC4EDCECE0100EEDFFFF4DCCCDCE4EDDEDCC0100EEDFFFF4DDC4ECCDD0000
0700429000106954B2493880B00429000201566958B2563917050042900030165B238460000


I want to split the above into 3 records (presumably using RECM=VB):
----+----1----+----
USR0001 FRED.SMITHY
EEDFFFF4CDCC4EDCECE
429000106954B249388

----+----1----+----2---
USR0002 JEFFREY.SNOTRAG
EEDFFFF4DCCCDCE4EDDEDCC
429000201566958B2563917

----+----1----+--
USR0003 JOE.SCHMO
EEDFFFF4DDC4ECCDD
42900030165B23846

Ken MacKenzie 
Pramerica Systems Ireland Limited is a private company limited by shares 
incorporated and registered in the Republic of Ireland with registered 
number 319900 and registered office at 6th Floor, South Bank House, Barrow 
Street, Dublin 4, Ireland. 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to