Extra/parse lines from a file between unque lines through the file

I need help to parse a file where there are many records, all of which are consistently separated by lines containing �^=============� and "^ End of Report".

Example:

1
2
3
4
End of record

1
3
4
End of record
Etc....

I only need specific lines within start and finish.
Output
1,2,3
1,3
Etc...

As a bonus it would also help if I could extract allines start content and finish to a file as in
fileA

1
2
3
4
End of record

fileB

1
3
4
End of record

Etc...

I have had the need for this several times and never had much luck processing it myself.
Any suggestions will be greatly appreciated.
I have looked this up and just didn't find one with an example that fit my circumstances.
I prefer to use ksh
Any suggestions will be greatly appreciated.
#
#

what exactly does the make the 'specific lines' so 'specific'?

> cat file155
=============
1
2
3
4
End of record
=============
1
3
4
End of record
=============
1
3
4
End of record

> sed "s/record/record~/" <file155 | tr "\n" "=" | tr "~" "\n" | sed "s/..=End of record//g" | tr -s "=" | tr "=" "," | cut -d"," -f2-
1,2,3
1,3
1,3

WOW how does it work?
How does it only affect 1,2 and 3 and avoid 4.
I would like to use the command as a template for similar edits.
I find it really difficult from your syntax to reproduce the same behavior on a file with different start and finish and different lines to extract from.

> sed "s/record/record~/" <file155 | tr "\n" "=" | tr "~" "\n" | sed "s/..=End of record//g" | tr -s "=" | tr "=" "," | cut -d"," -f2-

> sed "s/record/record~/" <file155 +++ add a ~ to end of word as marker
| tr "\n" "=" +++ translate new-line to = character; puts all on 1 line
| tr "~" "\n" +++ translate ~ to new-line; now 1 rec per line
| sed "s/..=End of record//g" +++ use sed to delete 2 chars & =End of record
| tr -s "=" +++ suppress multiple consecuticve = characters; as in breaks
| tr "=" "," +++ translate remaining = to ,
| cut -d"," -f2- +++ cut the data with , delim for fields 2 to end

I would suggest trying the sed command, then pipe that to include the first tr command. Keep adding commands one-at-a-time to see the progression of how the data is manipulated.

I appreciate your help. Can that be applied a file with the following content.
datactr@acuransx:nbemmcmd -listmedia -mediaid 103549
NBEMMCMD, Version:6.5

Media GUID: c9f01152-eb8a-11dd-8000-9a518a76e394
Media ID: 103549
Partner: -
Media Type: HCART2
Volume Group: ---
Application: Netbackup
Media Flags: 1
Description: Rules for LTO Tapes
Barcode: 103549
Partner Barcode: --------
Last Write Host: legend
Created: 01/26/2009 14:22
Time Assigned: 01/27/2009 16:15
First Mount: 01/27/2009 16:07
Last Mount: 01/28/2009 07:02
Volume Expiration: -
Data Expiration: 02/27/2009 07:00
Last Written: 01/28/2009 07:00
Last Read: -
Robot Type: NONE
Robot Control Host: -
Robot Number: -
Slot: -
Side/Face: -
Cleanings Remaining: -
Number of Mounts: 11
Maximum Mounts Allowed: 0
Media Status: ACTIVE
Kilobytes: 192549351
Images: 11
Valid Images: 11
Retention Period: 2
Number of Restores: 0
Optical Header Size Bytes: 1024
Optical Sector Size Bytes: 0
Optical Partition Size Bytes: 0
Last Header Offset: 2136502
Adamm Guid: 00000000-0000-0000-0000-000000000000
Rsm Guid: 00000000-0000-0000-0000-000000000000
Origin Host: NONE
Master Host: acuransx
Server Group: UNRESTRICTED_SHARING_GROUP
Upgrade Conflicts Flag:
Pool Number: 8
Volume Pool: LTO-Tapes
Previous Pool Name: -
Vault Flags: -
Vault Container: -
Vault Name: -
Vault Slot: -
Session ID: -
Date Vaulted: -
Return Date: -

Where "^Media GUID:" is the start and "^Return Date" is finish and I want to extract any number or lines to be displayed across one line.
example output
Media ID,Media Status,Media Type,Data Expiration,Return Date
103549,ACTIVE,HCART2,02/27/2009 07:00,-

Netbackup has several commands that output data in this format. I was hoping for syntax that i could change start and finish lines and continue to extract lines between them.

Again thanks for you help with this JoeG.