Hi Jan
I too am learning to write SID's and STAR's.
After looking at examples of sid's and star's from the SIDDATA.TXT and
STARDATA.TXT file I have come to the following conclusions.
STAR's
Using KLAX as an example
First comes the name of the STAR followed by the RWY used for landing.

PDZ4 RW24L
Next part is the STAR, starting with 1>

1> JLI AMIGO MUELR DUEDD @16000 JEROM @15000 PDZ PDZ TEJAY @12000

Next part is the name of the transition
PDZ4 JLI
Followed by the transition starting with 3> (Not sure why 2> is not used)

3> TEJAY @12000 SUPAI @11000 LYVIA @09000 CRISY @08000

SID's
First line is the name and rwy used.

GMN3 RW06B

Next part starting with 1> is the SID

1> +526 .CRS069 @00526 LAX .DME003 @O .CRS070 +V VNY .CRS306 GMN

Next part is the name of the transition
GMN3 AVE

Then the transition starting with 3>
3> GMN COREZ AVE

GMN3 EHF
3> GMN EHF

In this example the GMN3 departure off rwy 07B (the B meaning both 07L and
07R) there is one SID which has two transitions. AVE and EHF

GMN3 RW07B
1> +526 .CRS069 @00526 +V VNY .CRS306 GMN
GMN3 RW24B
1> +526 .CRS249 @00526 +INTC250 @O @03000B +V GMN .CRS322
GMN3 RW25B
1> +526 .CRS249 @00526 +INTC250 @O @03000B +V GMN .CRS322

The other examples of the GMN3 departure off rw07 L and R and 24 and 25 L and
R do not appear to have transitions.

As I don't have an APPDATA.TXT file to look at I still have a lot to learn
about the formating of approach files.

Anybody who recognises errors in my post please let me know by posting or
privately at thegayfords@xtra.co.nz

Rgds
John Gayford