× Discuss on Template programming, jBASE programming, Enquiries, No-File enquiry, Enquiry routines, Version, Version routines, Menus, Abbriviations, Creating local reference fields, Fast path enquiries, Creating charts and graphs, Generating Reports, Deal slips, Straight through processing, Multi Company and Multi Book setup, Tabbed screens, Composite Screens, T24 API, etc...

Alignment in Progrms

  • SAIKRISHNA
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 3 months ago #20875 by SAIKRISHNA
Alignment in Progrms was created by SAIKRISHNA
Hi All,

Generally when we write a program or subroutine we give the alignment(CTRL+V) and Compile vice versa..now i have a requirement to give alignment for nearly 5000 routines.Manually we can but its a long process.So can any one help me how to achieve this through program in T24 ? (Through VB script its working but in T24 is it possible??)


Thanks in Advance
Saikrishna Pammi

Please Log in or Create an account to join the conversation.

  • armin
  • armin's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • “So long - and thanks for all the fish!”
More
7 years 3 months ago #20876 by armin
Replied by armin on topic Alignment in Progrms
I haven't tried this, but I would write a routine that makes a execute on jfb for each file you want to set indents, capture the result and store it in a new directory . . .


READNEXT FILE.NAME....
EX.CMD = "jfb " : FILE.NAME
EXECUTE EX.CMD CAPTURING NEW.CODE

... loop thru NEW.CODE stripping off leading numbers and write to new file ...

using R11 on Unix

Please Log in or Create an account to join the conversation.

  • SAIKRISHNA
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 2 months ago - 7 years 2 months ago #20884 by SAIKRISHNA
Replied by SAIKRISHNA on topic Alignment in Progrms
Hi ARMIN,

Thank you for your reply.I am tried with your code, it some what reached.But I have faced extra line no's in output file like below.

Command->
0001 .[H.[2Jjfb Record TTTT , file .
0002
0003 0001 PROGRAM TTT
0004 0002 CRT 'SAI'
0005 0003 END

Is there any another way for correct alignment without these extra codes? plz help me to achieve this.
Last edit: 7 years 2 months ago by SAIKRISHNA.

Please Log in or Create an account to join the conversation.

  • armin
  • armin's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • “So long - and thanks for all the fish!”
More
7 years 2 months ago #20885 by armin
Replied by armin on topic Alignment in Progrms

... loop thru NEW.CODE stripping off leading numbers and write to new file ...


Like this :
CMD = "SELECT XX.BP UNLIKE I_... AND UNLIKE $..."
EXECUTE CMD

LOOP
    READNEXT FILE.NAME ELSE FILE.NAME = ""
WHILE FILE.NAME
    EX.CMD = "jfb XX.BP " : FILE.NAME
    EXECUTE EX.CMD CAPTURING NEW.CODE
    LINES = DCOUNT(NEW.CODE,@FM)

    << OPEN OUTPUTFILE >>


    FOR I = 1 TO LINES
        IF ISDIGIT(NEW.CODE<I>[1,4]) AND INDEX(NEW.CODE<I>,"jfb Record",1) = 0 THEN

            <<WRITE LINE TO OUTPUT>>

            ALIGNED<-1> = NEW.CODE<I>[5,500] ;*for testing
        END
    NEXT I

    << CLOSE OUTPUTFILE>>

* check it
    FOR a = 1 TO DCOUNT(ALIGNED,@FM)
        CRT ALIGNED<a>
    NEXT a

using R11 on Unix
The following user(s) said Thank You: madhulatha

Please Log in or Create an account to join the conversation.

Time to create page: 0.105 seconds