Code for PROGRAM TO USE OF LEADING AND TRAILING in Cobol
IDENTIFICATION DIVISION.
PROGRAM-ID. T1.
DATA DIVISION.
01 NUM1 PIC S99 SIGN IS LEADING.
01 NUM2 PIC 99V99.
01 NUM3 PIC S99 SIGN IS TRAILING.
PROCEDURE DIVISION.
PROG.
DISPLAY "ENTER NO="
ACCEPT NUM1.
DISPLAY "LEADING NUMBER IS =" NUM1.
DISPLAY "TRAILING NUMBER IS =" NUM3.
STOP RUN.
/*********************************************************************************************
OUTPUT
**********************************************************************************************/
ENTER NO = 20
LEADING NUMBR IS = +20
TRAILING NUBER IS = 00+