Page 1 of 2

New [CODE] tag with syntax Highlight

PostPosted: Fri Feb 05, 2016 4:13 am
by admin
We are introducing new CODE tag in our forum which will support VS COBOL II, ENTERPRISE COBOL, JCL, CICS and DB2 syntax. Just use the BBcode tag CODE and it will parse your input automatically. Please try and let me know your suggestions.

Here are some samples:

IDENTIFICATION DIVISION.
 PROGRAM-ID. JOBINFO.
*testing
********comments
 DATA DIVISION.
 WORKING-STORAGE SECTION.
 01 JOB-NAME             PIC X(8).
 01 PROGRAM-NAME         PIC X(8).
 01 STEP-NAME            PIC X(8).

 LINKAGE SECTION.
 01 PSA.
    05 FILLER     PIC X(540).
    05 PSATOLD    POINTER.

 01 TCB.
    05 FILLER     PIC X(12).
    05 TCBTIO     POINTER.
    05 FILLER     PIC X(164).
    05 TCBJSCBB   POINTER.

 01 TIOT.
    05 TIOCNJOB   PIC X(8).
    05 TIOCSTPN   PIC X(8).

 01 JSCB.
    05 FILLER     PIC X(360).
    05 JSCBPGMN   PIC X(8).

 PROCEDURE DIVISION.
     SET ADDRESS OF PSA TO NULL

     SET ADDRESS OF TCB TO PSATOLD

     SET ADDRESS OF TIOT TO TCBTIO

     MOVE TIOCNJOB TO JOB-NAME
     MOVE TIOCSTPN TO STEP-NAME

     SET ADDRESS OF JSCB TO TCBJSCBB

     MOVE JSCBPGMN TO PROGRAM-NAME
     DISPLAY 'JOB NAME     = ' JOB-NAME
     DISPLAY 'STEP NAME    = ' STEP-NAME
     DISPLAY 'PROGRAM NAME = ' PROGRAM-NAME
     GOBACK.


****** ***************************** Top of Data **************************************
000001 //COBCOMP JOB 'IBMMFS','MAC',CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID                        
000002 //PROCLIB JCLLIB ORDER=IBMMFS.PRC.COBL  
000003 //STEP1 EXEC IGYWCL,
000004 // PARM.COBL='LIB,APOST,XREF,MAP,OFFSET'  
000005 //COBL.SYSIN DD DISP=SHR,DSN=IBMMFS.MAC.SOURCE(COBL)
000006 //LKED.SYSLIB DD DISP=SHR,DSN=IBMMFS.MAC.CCOPY(SUBCOB)
000007 //LKED.SYSLMOD DD DISP=SHR,DSN=IBMMFS.MAC.LOAD(COBL)
000008 //SYSPRINT DD SYSOUT=*
000009 //
000009 //* testing comments
//* testing comments
****** **************************** Bottom of Data ************************************

Re: New [CODE] tag with syntax Highlight

PostPosted: Fri Feb 05, 2016 4:28 am
by enrico-sorichetti
unfortunately the color scheme used makes things pretty unreadable

it would be better to keep also the old green on black scheme with NO SYNTAX highlight

Re: New [CODE] tag with syntax Highlight

PostPosted: Fri Feb 05, 2016 4:40 am
by admin
Thanks for your suggestion. we will try to improve the readability of the syntax in future.

Re: New [CODE] tag with syntax Highlight

PostPosted: Fri Feb 05, 2016 4:58 am
by admin
Now you can use <code=old>xxx<code> If you don't want to use the new syntax highlight option.

EDIT  IBMMFS.MACC.COBOL(PGM001)                                                      Columns 00001 - 00072
****** ***************************** Top of Data **************************************
000001                ID DIVISION.
000002                PROGRAM-ID. PGM001.
000003                DATA DIVISION.
000004                WORKING-STORAGE SECTION.
000005                01 A PIC 9(09).
000006                PROCEDURE DIVISION.
000007                0001-MAIN.
000008                        ACCEPT A.
000009                        DISPLAY "OUTPUT IS: " A.
000010                        STOP RUN.
****** **************************** Bottom of Data ************************************

EDIT   IBMMFS.MACC.COBOL(JCL)                                                             Columns 00001 - 00072
****** ***************************** Top of Data **************************************
000001 //COMPJCL JOB 'IBMMFS','MAC',CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID
000002 //STEP1 EXEC IGYWCL,
000003 // PARM.COBOL='LIB,APOST,XREF,MAP,OFFSET'
000004 //COBOL.SYSIN DD DISP=SHR,DSN=IBMMFS.MACC.COBOL(PGM001)
000005 //LKED.SYSLMOD DD DISP=SHR,DSN=IBMMFS.MACC.LOAD(PGM001)
000006 //SYSPRINT DD SYSOUT=*
000007 //
****** **************************** Bottom of Data ************************************

Re: New [CODE] tag with syntax Highlight

PostPosted: Fri Feb 05, 2016 5:35 am
by enrico-sorichetti
unfortunately the background of the CODE box is the same as the background of the rest of the page ...
and the box is not visible ( at least on Safari )

aaa
bbb
ccc
 


at least for code=old could You please make text and background green on black?

Re: New [CODE] tag with syntax Highlight

PostPosted: Fri Feb 05, 2016 12:30 pm
by admin
Its a bug, and we are working on that.

Re: New [CODE] tag with syntax Highlight

PostPosted: Fri Feb 05, 2016 1:38 pm
by prino
If you want to do highlighting, use the default colours used by ISPF!

Re: New [CODE] tag with syntax Highlight

PostPosted: Fri Feb 05, 2016 3:27 pm
by enrico-sorichetti
please revert to the previous behaviour
ALL the code snippets are unreadable and it is very hard to provide answers

please help the people who on their own time and free of charge help the others

Re: New [CODE] tag with syntax Highlight

PostPosted: Fri Feb 05, 2016 4:38 pm
by admin
Dear Enrico,

Clear your browser catch and try again now. if you are still facing the problem please send me a screenshot so that we will find a possible solution.

Re: New [CODE] tag with syntax Highlight

PostPosted: Fri Feb 05, 2016 4:45 pm
by enrico-sorichetti
thank You, looks good now,
the only thing missing is the selec for the code' d data