MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How Can I Get This From SORT or EZT ?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
mnandyal
Beginner


Joined: 21 Apr 2003
Posts: 3
Topics: 1
Location: Indore

PostPosted: Tue Apr 22, 2003 1:46 am    Post subject: How Can I Get This From SORT or EZT ? Reply with quote

Hi ,
I am having 2 files OF FIXED LENGTH 80 . like below.

The content of file FILE A:

CR3004485
CR3006516
CR3088245
CR3089123
CR3500366
CR3000067

The content of file b:

++GROUP
2652,CR3000047 ; PHASE=001; RTYP=F; RTYPID=SRY900Z1; RCOMPANY=SR ;
RUSE=1; RAMT=0000900;.
++GROUPEND
++GROUP
2652,CR3006516 ; PHASE=001; RTYP=F; RTYPID=SRY900Z1; RCOMPANY=SR ;
RUSE=1; RAMT=0000900;.
++GROUPEND
++GROUP
2652,CR3000058 ; PHASE=001; RTYP=F; RTYPID=SRY900Z1; RCOMPANY=SR ;
RUSE=1; RAMT=0001600;.
++GROUPEND
++GROUP
2652,CR3000059 ; PHASE=001; RTYP=F; RTYPID=SRY900Z1; RCOMPANY=SR ;
RUSE=1; RAMT=0002000;.
++GROUPEND
++GROUP
2652,CR3000067 ; PHASE=001; RTYP=F; RTYPID=LNCK0082; RCOMPANY=LN ;
RUSE=1; RAMT=0001500;.
++GROUPEND
++GROUP
2652,CR3000067 ; PHASE=002; RTYP=F; RTYPID=LNCK0082; RCOMPANY=LN ;
RUSE=1; RAMT=0001500;.
++GROUPEND

I need to create a third file having all the data starting from ++GROUP to +GROUPEND when the number(CRXXXXXX) matches. Means the output(third ) file should be like below.

++GROUP
2652,CR3006516 ; PHASE=001; RTYP=F; RTYPID=SRY900Z1; RCOMPANY=SR ;
RUSE=1; RAMT=0000900;.
++GROUPEND
++GROUP
2652,CR3000067 ; PHASE=001; RTYP=F; RTYPID=LNCK0082; RCOMPANY=LN ;
RUSE=1; RAMT=0001500;.
++GROUPEND
++GROUP
2652,CR3000067 ; PHASE=002; RTYP=F; RTYPID=LNCK0082; RCOMPANY=LN ;
RUSE=1; RAMT=0001500;.
++GROUPEND

Thanks in advance.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Apr 22, 2003 4:08 pm    Post subject: Reply with quote

mnandyal,

The data is not sorted in either files and there are duplicates in the second file. unless you read the second file multiple times , you will not be able to get the desired results.

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mnandyal
Beginner


Joined: 21 Apr 2003
Posts: 3
Topics: 1
Location: Indore

PostPosted: Tue Apr 22, 2003 11:06 pm    Post subject: Reply with quote

Hi Kolusu,
Thank you very much for your reply.
You mean to say that I need to go for cobol program?
One more thing I can go for sorting of the file1.

I tried to modify and get the desired results from the COBOL program which you kept in the same forum.But I am unable to get the desired results.Can you help me out.
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Wed Apr 23, 2003 5:06 am    Post subject: Reply with quote

mnandyal,
I posted a soultion here
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group