In the above data - PR and CT are the state name. Please help me to get this done.
deleted the attachment and inlined the sample data
0000000000001.....SBENJAMIN MUNIZ ROLDOS 1795 CALLE ALCALA SAN JUAN, PR
0000001002358.....EJIM GULALO 41 HATTERTOWN RD Newtown, CT
0000001010001.....EPHYSICIANS REGIONAL MEDICAL 6101 PINE RIDGE ROAD NAPLES, FL
0000001011352.....EHELEN M KOCH LAS PALMAS UNIT 478 215 NORTH POWER RD. MESA, AZ
0000001033580.....EHEALTH INSURANCE ASSOC LLP 565 WASHINGTON AVE NORTH HAVEN, CT
do not post attachments, not everybody can see/download them
Joined: 14 Mar 2007 Posts: 8593 Location: Back in jolly old England
Please do not use attachments as not everybody can use them, thus reducing the number of people able to help you.
Search the forum, and if you use DFSORT, search for SS. Not sure if this is supported using SYNCSORT. There are examples on the forum to determine both the sort product and its release level. PLease check this out and post the results.
I have a concern. My dataset in which this address data are present is of length 650. This state field might occur at ay point in the dataset. But it occurs only after a comma. My question is since the comma position is variable, will it be possible to extract records in the way that you've mentioned ? And the 80 you've given in the SORT CARD specifies the length, right ?
I tried the above code, but there seems to be some hiccup while arriving at the output. Below are my findings -
0000001002358.....EJIM GULALO 41 HATTERTOWN RD Newtown, MA
0000001011352.....EHELEN M KOCH LAS PALMAS UNIT 478 215 NORTH POWER RD. MESA, PR
0000001041404.....ETALLPINES REHAB & LIVING TALLPINES REHAB & LIVING 34 MARTIN LANE BELFAST, ME
0000001042974.....EAHERN DONALD PO BOX 838 11 MECHANIC ST BUCKSPORT, MA
000000000001.....SBENJAMIN MUNIZ ROLDOS 1795 CALLE ALCALA SAN JUAN, PR
000001002358.....EJIM GULALO 41 HATTERTOWN RD Newtown, MA
000001010001.....EPHYSICIANS REGIONAL MEDICAL 6101 PINE RIDGE ROAD NAPLES, FL
000001011352.....EHELEN M KOCH LAS PALMAS UNIT 478 215 NORTH POWER RD. MESA, PR
000001033580.....EHEALTH INSURANCE ASSOC LLP 565 WASHINGTON AVE NORTH HAVEN, CT
000001041404.....ETALLPINES REHAB & LIVING TALLPINES REHAB & LIVING 34 MARTIN LANE BELFAST, ME
000001042974.....EAHERN DONALD PO BOX 838 11 MECHANIC ST BUCKSPORT, MA
000001044352.....ELESLIE E HALL PO BOX 58 GRANTHAM, NH
000001044853.....ENARRAGUAGUS BAY HEALTH 179 LISBON ST 2 LEWISTON, ME
000001050541.....ENORTHEAST FINANCIAL GROUP LLC PO BOX 567 EAST LYME, CT
//SYSIN DD *
Eventhough i just sepcified 'MA' in my filter criteria, it is pulling up other records too. Am not sure what's going wrong. Can you help me plz.
Joined: 22 Apr 2006 Posts: 6258 Location: Mumbai, India
But instead of fetching only MA records, the output file has CA records too !
Do "CA-record"s also fall in this range INCLUDE COND=(1,650,SS,EQ,C', MA'), if yes, they might show up.
On the other hand, the input you show in one of your previous replies - they don't have any data in which "CA" is present the way you siad it.. Please show the data for which you say the sort-card is not working. And also show us the expected output.
PS. Keeping in mind that users from different part of the globe log-in to this forum, please avoid using local slang words...
I fixed it up. The reason why CA records were also showing up was because, the string (', MA') was present in one more field too. So, when i changed the SORT CARD to check for the string like INCLUDE COND=(50,600,SS,EQ,C', MA'), the output came good.