New [CODE] tag with syntax Highlight



Do you like the new Syntax highlighted [CODE] tag?

Yes, it's good and keep it
8
89%
No, the old one is good
1
11%
I don't care
0
No votes
 
Total votes : 9

New [CODE] tag with syntax Highlight

Postby admin » Fri Feb 05, 2016 4:13 am

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 ************************************
admin
Site Admin
 
Posts: 102
Joined: Wed May 23, 2007 5:49 pm
Has thanked: 14 times
Been thanked: 5 times

Re: New [CODE] tag with syntax Highlight

Postby enrico-sorichetti » Fri Feb 05, 2016 4:28 am

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: New [CODE] tag with syntax Highlight

Postby admin » Fri Feb 05, 2016 4:40 am

Thanks for your suggestion. we will try to improve the readability of the syntax in future.
admin
Site Admin
 
Posts: 102
Joined: Wed May 23, 2007 5:49 pm
Has thanked: 14 times
Been thanked: 5 times

Re: New [CODE] tag with syntax Highlight

Postby admin » Fri Feb 05, 2016 4:58 am

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 ************************************
admin
Site Admin
 
Posts: 102
Joined: Wed May 23, 2007 5:49 pm
Has thanked: 14 times
Been thanked: 5 times

Re: New [CODE] tag with syntax Highlight

Postby enrico-sorichetti » Fri Feb 05, 2016 5:35 am

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?
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: New [CODE] tag with syntax Highlight

Postby admin » Fri Feb 05, 2016 12:30 pm

Its a bug, and we are working on that.
admin
Site Admin
 
Posts: 102
Joined: Wed May 23, 2007 5:49 pm
Has thanked: 14 times
Been thanked: 5 times

Re: New [CODE] tag with syntax Highlight

Postby prino » Fri Feb 05, 2016 1:38 pm

If you want to do highlighting, use the default colours used by ISPF!
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 641
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 29 times

Re: New [CODE] tag with syntax Highlight

Postby enrico-sorichetti » Fri Feb 05, 2016 3:27 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: New [CODE] tag with syntax Highlight

Postby admin » Fri Feb 05, 2016 4:38 pm

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.
admin
Site Admin
 
Posts: 102
Joined: Wed May 23, 2007 5:49 pm
Has thanked: 14 times
Been thanked: 5 times

Re: New [CODE] tag with syntax Highlight

Postby enrico-sorichetti » Fri Feb 05, 2016 4:45 pm

thank You, looks good now,
the only thing missing is the selec for the code' d data
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Next

Return to Site Announcements