Page 1 of 1

cobol and jcl name standard?

PostPosted: Thu Feb 05, 2009 9:30 pm
by leon
about the syntax in cobol:
select xxx assign to name-cobol,
I wonder if name cobol must be the same with the name in jcl or others rule for
the name standard?

the below is my example:

this is my code for cobol:
*--------------------*
       INPUT-OUTPUT SECTION.
      *--------------------*

       FILE-CONTROL.
           SELECT INPUT-T5-FILE        ASSIGN TO UT-S-T5FILE.
           SELECT OUTPUT-BN-FILE       ASSIGN TO UT-S-BNFILE.
           SELECT OUTPUT-NOBN-FILE     ASSIGN TO UT-S-NOBNFILE.
           SELECT OUTPUT-NGF-FILE      ASSIGN TO UT-S-NGFFILE.


this is my code for JCl:
 //BNFILE   DD  DSN=MP.UMP9LFC.VALIDBN,DISP=(NEW,CATLG,KEEP),   
 //             UNIT=SYSDA,                                     
 //             SPACE=(TRK,(1,1),RLSE)                         
 //NOBNFILE DD  DSN=MP.UMP9LFC.NOBN,DISP=(NEW,CATLG,KEEP),     
 //             UNIT=SYSDA,                                     
 //             SPACE=(TRK,(1,1),RLSE)                         
 //NGFFILE  DD  DSN=MP.UMP9LFC.NFG,DISP=(NEW,CATLG,KEEP),       
 //             UNIT=SYSDA,                                     
 //             SPACE=(TRK,(1,1),RLSE)   


UT-S-BNFILE and BNFILE are different name, but why do the JCL run succesfull?
thank you.

Re: cobol and jcl name standard?

PostPosted: Fri Feb 06, 2009 1:08 am
by dick scherrer
Hello,

UT-S-BNFILE and BNFILE are different name
No, they're not. Those are the same name. . . ;) Whatever comes after the "ut-s-" must be the ddname and that is what is posted.

Re: cobol and jcl name standard?

PostPosted: Fri Feb 06, 2009 7:57 pm
by leon
thank you very much! Mr. D

Re: cobol and jcl name standard?

PostPosted: Sat Feb 07, 2009 1:38 am
by dick scherrer
You're welcome :)

d

Re: cobol and jcl name standard?

PostPosted: Wed Feb 18, 2009 11:24 pm
by chetan_007
In the above example if UT-S-BNFILE and BNFILE are same.
Then what's the necessity to use UT-S-BNFILE, instead always we can use BNFILE only as DD name right???

Re: cobol and jcl name standard?

PostPosted: Thu Feb 19, 2009 1:20 am
by dick scherrer
Hello,

we can use BNFILE only as DD name right
The compiler will let you for ut-s- files, but your organization may have coding standards that do not accept the short form. . .