What product are you trying to use? DFSORT has STARTREC and ENDREC parameters (in OUTFIL), and DFSORT's ICETOOL has a COPY operator, but what you show isn't DFSORT or ICETOOL syntax. Are you trying to use DFSORT?
You can't use a DFSORT symbol for SKIPREC, STOPAFT, STARTREC or ENDREC. If you want to get a count of records for a file and use it to extract records, you would have to generate a control statement to do that and use that control statement in the second step.
If you show me exactly what you're trying to do, I can show you how to do it. Are we talking about one file for the count and another file for the extract or the same file or what? Which records are you trying to extract (e.g., 1 to 20, 25 to 50, ?)?
That really doesn't tell us which records you're trying to extract from file02. If file03 has a count of n, do you want to extract the first n records from file02, or some other set of records (what set?)? It would help if you'd show an example of the records in each input and output file. Also, what is the RECFM and LRECL of each input file?