I am working on a program that writes information to a output file and also to PRTOUTA, PRTOUTB, PRTOUTC with a PRTRTENO program. You have to move variables to a PRINT-AREA and so forth.
I am sure that it has to do with PRTRTENO but I am not completely certain
Cobol:
PRINT-B.
DISPLAY 'PRINT-B SECTION'
MOVE 'B' TO RPT.
CALL 'PRTRTENO' USING PRINT-AREA.
PRINT-B-X. EXIT.
Cobol Call:
MOVE TEST-LINE TO PRINT-AREA. PERFORM PRINT-B.
More Cobol:
PAGE-TOPA.
MOVE 'P' TO CTL.
PRINT-A.
MOVE 'A' TO RPT. <-- Is it here that determines the JCL printout.
CALL 'PRTRTENO' USING PRINT-AREA.
IF CTL = '*'
PERFORM HEAD-A THRU HEAD-A-X
END-IF.
HEAD-A.
...etc... //code here
HEAD-A-X.
JCL:
//OUTPUT1 DD DSN=Test-File-Name-Goes-Here,DISP=(,CATLG),
// DCB=TS20.FB0080.MODEL,MGMTCLAS=TDML1 --EMAIL
//PRTOUTA DD SYSOUT=1,DCB=TS20.FBM0133.MODEL --EOS
//PRTOUTB DD SYSOUT=1,DCB=TS20.FBM0133.MODEL --LABELS
//PRTOUTC DD SYSOUT=1,DCB=TS20.FBM0133.MODEL --NO EMAIL
Files are made known to your COBOL program through the FILE-CONTROL paragraph in the ENVIRONMENT DIVISION of a program. The FILE-CONTROL paragraph looks something like:
FILE-CONTROL.
SELECT PRT-FILE <-- Name in FD SECTION
ASSIGN TO PRTOUTA <-- JCL DD Name
...
Then in the DATA DIVISION you use an FD to associate a record buffer to the SELECTed file from FILE-CONTROL. When you READ/WRITE to the associated buffer a record is transferred from your program to the named file. FD's will begin with:
FD PRT-FILE <-- same as SELECT from FILE-CONTROL
...
Beyond that things can get a little complicated because your program is not writing to these files directly, but through a called program ('PRTRTENO'). The above file definitions may appear in your program or in the called program. In either event they are probably declared as EXTERNAL making them available anywhere in your run-unit.
I'm betting that you will find them as EXTERNAL in the called program. So to answer your question, you need to look for the FILE-CONTROL paragraph and FD in your program. If they do not relate to the JCL DD Names, then look in the called program - they must be there.