Results 1 to 25 of 25

Thread: COBOL forums

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2004
    Location
    youngstown, oh
    Posts
    202

    COBOL forums

    I need a forum just like this one, where I can get COBOL help !
    Does anyone know of one, or does anyone here really nifty with COBOL themselves ? I have a class now, and it is unreal how much help I need. So please if anyone feels they can help , I'd very much apperciate it.

    I have a giant 700+ pg txt book, but it dosen't give help like a person. And in a class with over 60 students, it's hard to get personal help from the Prof.

    Any any any one out there that knows of good help....please.

    Thanks again - justin
    --thanks for the help.

  2. #2
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: COBOL forums

    Post a question here that you have - let's see if we can answer it...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: COBOL forums

    Moved

  4. #4

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: COBOL forums

    Quote Originally Posted by RhinoBull
    I can't believe they still teach COBOL in scholls.
    With all of the legacy COBOL code out there I can see a need for COBOL programmers for years to come.

    Here is a COBOL FAQ site that I found with a forum. I can not attest to its quality however.

    I Googled "Cobol Forums" and got back quite a few hits. Try it and see if you find anything that looks interesting.

  6. #6
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: COBOL forums

    Quote Originally Posted by RhinoBull
    I can't believe they still teach COBOL in scholls.
    Check out this link - look for COBOL in some of the graphs - it's actually still a lot bigger then most people want to believe...

    http://www.dedasys.com/articles/lang...opularity.html

    Most of the big legacy insurance and claims processing software is still written in COBOL - lot's of ordering systems - will take 20 more years for it to all be ported or "glazed over" (with COBOL still as the backend!).

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  7. #7
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: COBOL forums

    Quote Originally Posted by szlamany
    Most of the big legacy insurance and claims processing software is still written in COBOL
    I'm in the insurance industry and I can definately attest to this!!!

  8. #8
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: COBOL forums

    The Big Blues still push around a 1000-byte cobol formatted record - the packed numeric datatypes are so difficult to deal with in SQL...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  9. #9
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: COBOL forums

    Hmm, I'm well aware of the legacy apps but what I am surprised is the fact that there were many (many) COBOL programmers "let go" after the Y2K nonsense was over and many of them are still looking to get back so why in the heck would you want to hire someone with no COBOL background when you can [figurally speaking] wistle and get someone with very heavy experience???

  10. #10
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: COBOL forums

    I think that the COBOL needs are different now - the cobol apps are being amended with web-frontends - people using screen scrapers to put new GUI's on top - it's a different COBOL world then the "develop on a dumb terminal" COBOL world of the 70's and 80's.

    COBOL is now being taught in more and more colleges so that the new breed of programmers can handle the mixed world that COBOL exists in.

    COBOL is on the increase right now...

    http://www.technewsworld.com/story/55346.html

    In 2000 60% of our income came from COBOL contracts. In 2001 that number was still near 50%. It would still be a major factor if we didn't start focusing on a VB/SQL product line here.

    It's nice to know that we can always bring back online our COBOL consulting business in the future.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    Oct 2004
    Location
    youngstown, oh
    Posts
    202

    Re: COBOL forums

    alright, i'm going to post my code in here in a couple of minutes, but it's good to see that people still care about cobol. That's what my professsor told the class, that "you might not think it's widley used', but really i guess it is. thanks for all the replies, ill get this together in no time. -thanks justin.....

    Actully, quik question, how am I able to copy my code that i have on the iseries server. I use putty to access it, and i can't find a way to copy and past my file in a notepad of some sorts...any ideas.??
    Last edited by jlbovo; Feb 14th, 2007 at 11:48 AM.
    --thanks for the help.

  12. #12
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: COBOL forums

    From what I can remember when you select the text with Putty it's automatically copied to the clipboard.

    Have you tried it?

    What is your backend machine?

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  13. #13

    Thread Starter
    Addicted Member
    Join Date
    Oct 2004
    Location
    youngstown, oh
    Posts
    202

    Re: COBOL forums

    VB Code:
    1. FMT CB ......-A+++B+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    2.         *************** Beginning of data *************************************
    3.  
    4. 0001.00        IDENTIFICATION DIVISION.                                        
    5.  
    6. 0002.00       *************************                                        
    7.  
    8. 0003.00       ** CIS 3741 LAB 2                                                
    9.  
    10. 0004.00       **                                                                
    11.  
    12. 0005.00       **JANUARY 30 - 2007                                              
    13.  
    14. 0006.00       **********************                                            
    15.  
    16. 0007.00       *                                                                
    17.  
    18. 0008.00        PROGRAM-ID. LAB2.                                                
    19.  
    20. 0009.00        ENVIRONMENT DIVISION.                                            
    21.  
    22. 0010.00        INPUT-OUTPUT SECTION.                                            
    23.  
    24. 0011.00        FILE-CONTROL.                                                    
    25.  
    26. 0012.00             SELECT STUDENT-FILE-IN                                      
    27.  
    28. 0013.00                  ASSIGN TO DISK-PESTUDENT.                              
    29.  
    30. 0014.00             SELECT STUDENT-FILE-OUT                                    
    31.  
    32. 0015.00                  ASSIGN TO PRINTER-QPRINT.    
    33. 0016.00        DATA DIVISION.                                                  
    34.  
    35. 0017.00        FILE SECTION.                                                    
    36.  
    37. 0018.00        FD   STUDENT-FILE-IN.                                            
    38.  
    39. 0019.00        01   STUDENT-RECORD-IN.                                          
    40.  
    41. 0020.00             05 STUDENT-NAME-IN          PIC X(20).                      
    42.  
    43. 0021.00             05 NUMBER-OF-CREDITS-IN     PIC 9(2).                      
    44.  
    45. 0022.00             05                          PIC X(58).                      
    46.  
    47. 0023.00        FD   STUDENT-FILE-OUT.                                          
    48.  
    49. 0024.00        01   PRINT-REC-OUT.                                                
    50. 0025.00             05 STUDENT-NAME-OUT         PIC X(20).                      
    51.  
    52. 0026.00             05                          PIC X(20).                      
    53.  
    54. 0027.00             05 NUMBER-OF-CREDITS-OUT    PIC 9(2).                      
    55.  
    56. 0028.00             05                          PIC X(20).                      
    57.  
    58. 0029.00             05 TUITION-OUT              PIC 9(4).                      
    59.  
    60. 0030.00             05                          PIC X(14).                      
    61.  
    62. 0031.00        WORKING-STORAGE SECTION.                                        
    63.  
    64. 0032.00        01   ARE-THERE-MORE-RECORDS        PIC XXX   VALUE "YES".        
    65.  
    66. 0033.00        01   PART-TIME-TUITION             PIC 9(3)  VALUE 525.          
    67.  
    68. 0034.00        01   FULL-TIME-TUITION             PIC 9(4)  VALUE 6300.    
    69. 0035.00        01   LINE-CNTR                     PIC 9(2)  VALUE 99.          
    70.  
    71. 0036.00        01   HEADING-LINE-1.                                            
    72.  
    73. 0037.00             05                           PIC X(10)  VALUE SPACES.      
    74.  
    75. 0038.00             05                           PIC X(13)  VALUE              
    76.  
    77. 0039.00                "STUDENT NAME".                                          
    78.  
    79. 0040.00             05                           PIC X(10)  VALUE SPACES.      
    80.  
    81. 0041.00             05                           PIC X(17)  VALUE              
    82.  
    83. 0042.00                "NUMBER OF CREDITS".                                    
    84.  
    85. 0043.00             05                           PIC X(10)  VALUE SPACES.    
    86. 0044.00             05                           PIC X(7)   VALUE              
    87.  
    88. 0045.00                "TUITION".                                              
    89.  
    90. 0046.00        PROCEDURE DIVISION.                                              
    91.  
    92. 0047.00        0-MAIN-MODULE.                                                  
    93.  
    94. 0048.00            OPEN INPUT STUDENT-FILE-IN                                  
    95.  
    96. 0049.00                 OUTPUT STUDENT-FILE-OUT                                
    97.  
    98. 0050.00            PERFORM UNTIL ARE-THERE-MORE-RECORDS = "NO "                
    99.  
    100. 0051.00                  READ STUDENT-FILE-IN                                  
    101.  
    102. 0052.00                       AT END MOVE "NO " TO ARE-THERE-MORE-RECORDS    
    103. 0053.00                       NOT AT END PERFORM 1-PROCESS-STUDENT              
    104.  
    105. 0054.00                  END-READ                                              
    106.  
    107. 0055.00            END-PERFORM                                                  
    108.  
    109. 0056.00            CLOSE STUDENT-FILE-IN                                        
    110.  
    111. 0057.00                   STUDENT-FILE-OUT                                      
    112.  
    113. 0058.00            STOP RUN.                                                    
    114.  
    115. 0059.00        1-PROCESS-STUDENT.                                              
    116.  
    117. 0060.00            IF LINE-CNTR > 50                                            
    118.  
    119. 0061.00            THEN                                                            
    120. 0062.00                PERFORM 2-PRINT-PAGE-HEADINGS                            
    121.  
    122. 0063.00            END-IF                                                      
    123.  
    124. 0064.00            MOVE SPACES TO PRINT-REC-OUT                                
    125.  
    126. 0065.00            MOVE STUDENT-NAME-IN TO STUDENT-NAME-OUT                    
    127.  
    128. 0066.00            MOVE NUMBER-OF-CREDITS-IN TO NUMBER-OF-CREDITS-OUT          
    129.  
    130. 0067.00            IF NUMBER-OF-CREDITS-IN > 12                                
    131.  
    132. 0068.00                MOVE FULL-TIME-TUITION TO TUITION-OUT                    
    133.  
    134. 0069.00            ELSE                                                        
    135.  
    136. 0070.00                MULTIPLY NUMBER-OF-CREDITS-IN BY PART-TIME-TUITION      
    137. 0071.00                            GIVING TUITION-OUT                          
    138.  
    139. 0072.00            END-IF                                                      
    140.  
    141. 0073.00            WRITE PRINT-REC-OUT AFTER ADVANCING 1 LINE                  
    142.  
    143. 0074.00            ADD 1 TO LINE-CNTR.                                          
    144.  
    145. 0075.00        2-PRINT-PAGE-HEADINGS.                                          
    146.  
    147. 0076.00            WRITE PRINT-REC-OUT FROM HEADING-LINE-1                      
    148.  
    149. 0077.00                                AFTER PAGE                              
    150.  
    151. 0078.00            MOVE 1 TO LINE-CNTR.                                            
    152.  
    153.      ****************** End of data ****************************************
    Last edited by jlbovo; Feb 14th, 2007 at 10:27 PM.
    --thanks for the help.

  14. #14

    Thread Starter
    Addicted Member
    Join Date
    Oct 2004
    Location
    youngstown, oh
    Posts
    202

    Re: COBOL forums

    ok thanks the code, there. and here's my output....
    VB Code:
    1. File  . . . . . :   QPRINT                           Page/Line   2/1
    2. Control . . . . .                                    Columns     1 - 78
    3. Find  . . . . . .
    4. *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+...
    5.           STUDENT NAME           NUMBER OF CREDITS          TUITION
    6. Johnson, Derek                           12                    $ 6300
    7. Murray, Susan                            11                    $ 5775
    8. Hartman, Tom                             13                    $ 6300
    9. Wilson, Lisa                             12                    $ 6300
    10. Browne, Dan                              18                    $ 6300
    11. Roberts, Doug                            16                    $ 6300
    12. Smith, Arlene                            08                    $ 4200
    ........

    now i have to add another heading. it has to have Date, Title, and Page #.

    this is what i came up with in class...
    VB Code:
    1. 0051.00        01   STUDENT-LINE-1.
    2. 0052.00             05 DATE-OUT                 PIC XX/XX/XX.
    3. 0053.00             05                          PIC X(24)  VALUE SPACES.
    4. 0054.00             05                          PIC X(15)  VALUE
    5. 0055.00                "STUDENT SUMMARY".
    6. 0056.00             05                          PIC X(11)  VALUE SPACES.
    7. 0057.00             05                          PIC X(13)  VALUE
    8. 0058.00                "PAGE NUMBER:".
    9. 0059.00             05 PAGE-OUT                 PIC ZZ9    VALUE ZEROS.
    10. 0060.00             05                          PIC X(15)  VALUE SPACES.
    ....and thsi si how it looks now...
    VB Code:
    1. Find  . . . . . .
    2.  *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+...
    3.  02/13/07                        STUDENT SUMMARY           PAGE NUMBER:   1
    4.  STUDENT NAME                     NUMBER OF CREDITS          TUITION
    5.  Johnson, Derek                          12                    $6,300
    6.  Murray, Susan                           11                    $5,775
    7.  Hartman, Tom                            13                    $6,300
    8.  Wilson, Lisa                            12                    $6,300
    9.  Browne, Dan                             18                    $6,300
    10.  Roberts, Doug                           16                    $6,300
    11.  Smith, Arlene                            8                    $4,200

    ....but how do i get a line in between the heading 1 (date page title) and heading -2 (name,credit, tutition) ??
    Last edited by jlbovo; Feb 14th, 2007 at 10:40 PM.
    --thanks for the help.

  15. #15
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: COBOL forums

    Would you mind editing those two last posts and use VBCODE tags instead of CODE tags...

    It stops the scroll bars...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  16. #16
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: COBOL forums

    Actually you are having some nasty carriage return issues on those posts...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  17. #17

    Thread Starter
    Addicted Member
    Join Date
    Oct 2004
    Location
    youngstown, oh
    Posts
    202

    Re: COBOL forums

    i went back and editied them. I really think it made a difference.
    How can i stop them from return carriageing like that ??

    mayb i'll try to telnet from the cmd, and see if that looks any better...

    VB Code:
    1. SEU==>                                                                  LAB2_3
    2.  FMT CB ......-A+++B+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    3.         *************** Beginning of data *************************************
    4. 0001.00        IDENTIFICATION DIVISION.
    5. 0002.00       *************************
    6. 0003.00       ** CIS 3741 LAB 2
    7. 0004.00       **
    8. 0005.00       **JANUARY 30 - 2007
    9. 0006.00       **********************
    10. 0007.00       *
    11. 0008.00        PROGRAM-ID. LAB2.
    12. 0009.00        ENVIRONMENT DIVISION.
    13. 0010.00        INPUT-OUTPUT SECTION.
    14. 0011.00        FILE-CONTROL.
    15. 0012.00             SELECT STUDENT-FILE-IN
    16. 0013.00                  ASSIGN TO DISK-PESTUDENT.
    17. 0014.00             SELECT STUDENT-FILE-OUT
    18. 0015.00                  ASSIGN TO PRINTER-QPRINT.
    19. 0016.00        DATA DIVISION.
    20. 0017.00        FILE SECTION.
    21. 0018.00        FD   STUDENT-FILE-IN.
    22. 0019.00        01   STUDENT-RECORD-IN.
    23. 0020.00             05 STUDENT-NAME-IN          PIC X(20).
    24. 0021.00             05 NUMBER-OF-CREDITS-IN     PIC 9(2).
    25. 0022.00             05                          PIC X(58).
    26. 0023.00        FD   STUDENT-FILE-OUT.
    27. 0024.00        01   PRINT-REC-OUT.
    28. 0025.00             05 STUDENT-NAME-OUT         PIC X(20).
    29. 0025.00             05 STUDENT-NAME-OUT         PIC X(20).
    30. 0026.00             05                          PIC X(20).
    31. 0027.00             05 NUMBER-OF-CREDITS-OUT    PIC Z9(2).
    32. 0028.00             05                          PIC X(20).
    33. 0029.00             05 TUITION-OUT              PIC $Z9(4).
    34. 0030.00             05                          PIC X(14).
    35. 0031.00        WORKING-STORAGE SECTION.
    36. 0032.00        01   ARE-THERE-MORE-RECORDS        PIC XXX   VALUE "YES".
    37. 0033.00        01   PART-TIME-TUITION             PIC 9(3)  VALUE 525.
    38. 0034.00        01   FULL-TIME-TUITION             PIC 9(4)  VALUE 6300.
    39. 0035.00        01   LINE-CNTR                     PIC 9(2)  VALUE 99.
    40. 0036.00        01   HEADING-LINE-1.
    41. 0037.00             05                           PIC X(10)  VALUE SPACES.
    42. 0038.00             05                           PIC X(13)  VALUE
    43. 0039.00                "STUDENT NAME".
    44. 0040.00             05                           PIC X(10)  VALUE SPACES.
    45. 0041.00             05                           PIC X(17)  VALUE
    46. 0042.00                "NUMBER OF CREDITS".
    47. 0043.00             05                           PIC X(10)  VALUE SPACES.
    48. 0044.00             05                           PIC X(7)   VALUE
    49. 0045.00                "TUITION".
    50. 0046.00        PROCEDURE DIVISION.
    51. 0047.00        0-MAIN-MODULE.
    52. 0048.00            OPEN INPUT STUDENT-FILE-IN
    53. 0049.00                 OUTPUT STUDENT-FILE-OUT
    54. 0050.00            PERFORM UNTIL ARE-THERE-MORE-RECORDS = "NO "
    55. 0051.00                  READ STUDENT-FILE-IN
    56. 0052.00                       AT END MOVE "NO " TO ARE-THERE-MORE-RECORDS
    57. 0053.00                       NOT AT END PERFORM 1-PROCESS-STUDENT
    58. 0054.00                  END-READ
    59. 0055.00            END-PERFORM
    60. 0056.00            CLOSE STUDENT-FILE-IN
    61. 0057.00                   STUDENT-FILE-OUT
    62. 0058.00            STOP RUN.
    63. 0059.00        1-PROCESS-STUDENT.
    64. 0060.00            IF LINE-CNTR > 50
    65. 0061.00            THEN
    66. 0062.00                PERFORM 2-PRINT-PAGE-HEADINGS
    67. 0063.00            END-IF
    68. 0064.00            MOVE SPACES TO PRINT-REC-OUT
    69. 0065.00            MOVE STUDENT-NAME-IN TO STUDENT-NAME-OUT
    70. 0066.00            MOVE NUMBER-OF-CREDITS-IN TO NUMBER-OF-CREDITS-OUT
    71. 0067.00            IF NUMBER-OF-CREDITS-IN > 12
    72. 0068.00                MOVE FULL-TIME-TUITION TO TUITION-OUT
    73. 0069.00            ELSE
    74. 0070.00                MULTIPLY NUMBER-OF-CREDITS-IN BY PART-TIME-TUITION
    75. 0071.00                            GIVING TUITION-OUT
    76. 0072.00            END-IF
    77. 0073.00            WRITE PRINT-REC-OUT AFTER ADVANCING 1 LINE
    78. 0074.00            ADD 1 TO LINE-CNTR.
    79. 0075.00        2-PRINT-PAGE-HEADINGS.
    80. 0076.00            WRITE PRINT-REC-OUT FROM HEADING-LINE-1
    81. 0077.00                                AFTER PAGE
    82. 0078.00            MOVE 1 TO LINE-CNTR.
    83.         ****************** End of data ****************************************

    YAY!!! - ok now , i'll go back up and edit those post 2 !. - justin
    Last edited by jlbovo; Feb 14th, 2007 at 10:34 PM.
    --thanks for the help.

  18. #18
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: COBOL forums

    Quote Originally Posted by jlbovo
    ....but how do i get a line in between the heading 1 (date page title) and heading -2 (name,credit, tutition) ??
    Well - you already know about AFTER ADVANCING x LINE in the WRITE statement.

    You are not showing the code with the "second heading" line - so I can't be specific...

    But I would guess you would add AFTER ADVANCING 2 LINES to the WRITE.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  19. #19

    Thread Starter
    Addicted Member
    Join Date
    Oct 2004
    Location
    youngstown, oh
    Posts
    202

    Re: COBOL forums

    Good thing you pointed out, I did post my old code, here's the new...
    VB Code:
    1. SEU==>                                                                   LAB_3
    2.  FMT CB ......-A+++B+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    3.         *************** Beginning of data *************************************
    4. 0001.00        IDENTIFICATION DIVISION.
    5. 0002.00       *************************
    6. 0003.00       ** CIS 3741 LAB 3
    7. 0004.00       **
    8. 0005.00       **FEBUARY 13 - 2007
    9. 0006.00       **********************
    10. 0007.00       *
    11. 0008.00        PROGRAM-ID. LAB3.
    12. 0009.00        ENVIRONMENT DIVISION.
    13. 0010.00        INPUT-OUTPUT SECTION.
    14. 0011.00        FILE-CONTROL.
    15. 0012.00             SELECT STUDENT-FILE-IN
    16. 0013.00                  ASSIGN TO DISK-PESTUDENT.
    17. 0014.00             SELECT STUDENT-FILE-OUT
    18. 0015.00                  ASSIGN TO PRINTER-QPRINT.
    19. 0016.00        DATA DIVISION.
    20. 0017.00        FILE SECTION.
    21. 0018.00        FD   STUDENT-FILE-IN.
    22. 0019.00        01   STUDENT-RECORD-IN.
    23. 0020.00             05 STUDENT-NAME-IN          PIC X(20).
    24. 0021.00             05 NUMBER-OF-CREDITS-IN     PIC 9(2).
    25. 0022.00             05                          PIC X(58).
    26. 0023.00        FD   STUDENT-FILE-OUT.
    27. 0024.00        01   PRINT-REC-OUT.
    28. 0025.00             05 STUDENT-NAME-OUT         PIC X(20).
    29. 0026.00             05                          PIC X(20).
    30. 0027.00             05 NUMBER-OF-CREDITS-OUT    PIC Z9.
    31. 0028.00             05                          PIC X(20).
    32. 0029.00             05 TUITION-OUT              PIC $Z,ZZ9.
    33. 0030.00             05                          PIC X(14).
    34. 0031.00         01  PRINT-SUMM-OUT-PART.
    35. 0032.00             05 PART-TIME-NOS            PIC ZZZ9.
    36. 0033.00             05 PART-TIME-NOC            PIC ZZ,ZZ9.
    37. 0034.00             05 PART-TIME-TUITIONS       PIC $Z,ZZZ,ZZ9.
    38. 0035.00         01  PRINT-SUMM-OUT-FULL.
    39. 0036.00             05 FULL-TIME-NOS            PIC ZZZ9.
    40. 0037.00             05 FULL-TIME-NOC            PIC ZZ,ZZ9.
    41. 0038.00             05 FULL-TIME-TUITIONS       PIC $Z,ZZZ,ZZ9.
    42. 0039.00         01  TOTAL-SUMM.
    43. 0040.00             05 TOTAL-NOS                PIC ZZZ9.
    44. 0041.00             05 TOTAL-NOC                PIC ZZ,ZZ9.
    45. 0042.00             05 TOTAL-TUITIONS           PIC $Z,ZZZ,ZZ9.
    46. 0043.00        WORKING-STORAGE SECTION.
    47. 0044.00        01   ARE-THERE-MORE-RECORDS      PIC XXX   VALUE "YES".
    48. 0045.00        01   PART-TIME-TUITION           PIC 9(3)  VALUE 525.
    49. 0046.00        01   FULL-TIME-TUITION           PIC 9(4)  VALUE 6300.
    50. 0047.00        01   PT-TUITION-CNTR             PIC 9(2)  VALUE ZEROS.
    51. 0048.00        01   FT-TUITION-CNTR             PIC 9(2)  VALUE ZEROS.
    52. 0049.00        01   PAGE-NUMB                   PIC 99    VALUE ZEROS.
    53. 0050.00        01   LINE-CNTR                   PIC 9(2)  VALUE 99.
    54. 0051.00        01   HEADING-LINE-1.
    55. 0052.00             05 DATE-OUT                 PIC XX/XX/XX.
    56. 0053.00             05                          PIC X(24)  VALUE SPACES.
    57. 0054.00             05                          PIC X(15)  VALUE
    58. 0055.00                "STUDENT SUMMARY".
    59. 0056.00             05                          PIC X(11)  VALUE SPACES.
    60. 0057.00             05                          PIC X(13)  VALUE
    61. 0058.00                "PAGE NUMBER :".
    62. 0059.00             05 PAGE-OUT                 PIC ZZ9    VALUE ZEROS.
    63. 0060.00             05                          PIC X(15)  VALUE SPACES.
    64. 0061.00        01   HEADING-LINE-2.
    65. 0062.00             05                          PIC X(13)  VALUE
    66. 0063.00                "STUDENT NAME".
    67. 0064.00             05                          PIC X(22)  VALUE SPACES.
    68. 0065.00             05                          PIC X(17)  VALUE
    69. 0066.00                "NUMBER OF CREDITS".
    70. 0067.00             05                          PIC X(10)   VALUE SPACES.
    71. 0068.00             05                          PIC X(7)   VALUE
    72. 0069.00                "TUITION".
    73. 0070.00        01 DATE-IN.
    74. 0071.00           05   YR-IN                    PIC X(2).
    75. 0072.00           05   MO-IN                    PIC X(2).
    76. 0073.00           05   DA-IN                    PIC X(2).
    77. 0074.00        01 DATE-WS                       PIC X(8).
    78. 0075.00        01 DATE-TEMP REDEFINES DATE-WS.
    79. 0076.00           05   MO-TEMP                  PIC X(2).
    80. 0077.00           05   DA-TEMP                  PIC X(2).
    81. 0078.00           05   YR-TEMP                  PIC X(2).
    82. 0079.00        PROCEDURE DIVISION.
    83. 0080.00        0-MAIN-MODULE.
    84. 0081.00            OPEN INPUT STUDENT-FILE-IN
    85. 0082.00                 OUTPUT STUDENT-FILE-OUT
    86. 0083.00            ACCEPT DATE-IN FROM DATE
    87. 0084.00            MOVE MO-IN TO MO-TEMP
    88. 0085.00            MOVE DA-IN TO DA-TEMP
    89. 0086.00            MOVE YR-IN TO YR-TEMP
    90. 0087.00            MOVE DATE-WS TO DATE-OUT
    91. 0088.00            PERFORM UNTIL ARE-THERE-MORE-RECORDS = "NO "
    92. 0089.00                  READ STUDENT-FILE-IN
    93. 0090.00                       AT END MOVE "NO " TO ARE-THERE-MORE-RECORDS
    94. 0091.00                       NOT AT END PERFORM 1-PROCESS-STUDENT
    95. 0092.00                  END-READ
    96. 0093.00            END-PERFORM
    97. 0094.00            CLOSE STUDENT-FILE-IN
    98. 0095.00                   STUDENT-FILE-OUT
    99. 0096.00            STOP RUN.
    100. 0097.00        1-PROCESS-STUDENT.
    101. 0098.00            IF LINE-CNTR > 50
    102. 0099.00            THEN
    103. 0100.00                PERFORM  1-2-PRINT-PAGE-HEADINGS
    104. 0101.00            END-IF
    105. 0102.00            MOVE SPACES TO PRINT-REC-OUT
    106. 0103.00            MOVE STUDENT-NAME-IN TO STUDENT-NAME-OUT
    107. 0104.00            MOVE NUMBER-OF-CREDITS-IN TO NUMBER-OF-CREDITS-OUT
    108. 0105.00            IF NUMBER-OF-CREDITS-IN > 12
    109. 0106.00                MOVE FULL-TIME-TUITION TO TUITION-OUT
    110. 0107.00                ADD 1 TO FT-TUITION-CNTR
    111. 0108.00            ELSE
    112. 0109.00                MULTIPLY NUMBER-OF-CREDITS-IN BY PART-TIME-TUITION
    113. 0110.00                            GIVING TUITION-OUT
    114. 0111.00                ADD 1 TO PT-TUITION-CNTR
    115. 0112.00            END-IF
    116. 0113.00            WRITE PRINT-REC-OUT AFTER ADVANCING 1 LINE
    117. 0114.00            ADD 1 TO LINE-CNTR.
    118. 0115.00        1-2-PRINT-PAGE-HEADINGS.
    119. 0116.00            ADD 1 TO PAGE-NUMB
    120. 0117.00            MOVE PAGE-NUMB TO PAGE-OUT
    121. 0118.00            WRITE PRINT-REC-OUT FROM HEADING-LINE-1
    122. 0119.00                  AFTER ADVANCING 1 LINE
    123. 0120.00            WRITE PRINT-REC-OUT FROM HEADING-LINE-2
    124. 0121.00                  AFTER ADVANCING 1 LINE
    125. 0122.00            MOVE 1 TO LINE-CNTR.
    126. 0123.00        2-PRINT-SUMMARY.
    127. 0124.00            IF LINE-CNTR > 50 THEN
    128. 0125.00                PERFORM 2-2-PAGE-HEADINGS
    129. 0126.00            END-IF
    130. 0127.00            MOVE SPACES TO PRINT-REC-OUT
    131. 0128.00            MOVE FT-TUITION-CNTR TO FULL-TIME-NOS.
    132. 0129.00        2-2-PAGE-HEADINGS.
    133.         ****************** End of data ****************************************

    ok, that is that if it helps you help me answer the question about the blank line. Does it no show on the screen put possibly print the blank line out when it's sent to the printer ?

    and the other thing the is I need 2-print-summary to run after 1-process student is done running to would I want to put the PERFORM clause for 2-print-summary somewhere like this...
    VB Code:
    1. 0080.00        0-MAIN-MODULE.
    2. 0081.00            OPEN INPUT STUDENT-FILE-IN
    3. 0082.00                 OUTPUT STUDENT-FILE-OUT
    4. 0083.00            ACCEPT DATE-IN FROM DATE
    5. 0084.00            MOVE MO-IN TO MO-TEMP
    6. 0085.00            MOVE DA-IN TO DA-TEMP
    7. 0086.00            MOVE YR-IN TO YR-TEMP
    8. 0087.00            MOVE DATE-WS TO DATE-OUT
    9. 0088.00            PERFORM UNTIL ARE-THERE-MORE-RECORDS = "NO "
    10. 0089.00                  READ STUDENT-FILE-IN
    11. 0090.00                       AT END MOVE "NO " TO ARE-THERE-MORE-RECORDS
    12. 0091.00                       NOT AT END PERFORM 1-PROCESS-STUDENT
    13. 0092.00                  END-READ
    14. 0093.00            END-PERFORM
    15. **my pseudocode
    16.                        move yes to are the-more-records
    17. 0088.00            PERFORM 2-print-summary
    18. 0093.00            END-PERFORM
    19. *****end of my pcode.
    20.  
    21. 0094.00            CLOSE STUDENT-FILE-IN
    22. 0095.00                   STUDENT-FILE-OUT
    23. 0096.00            STOP RUN.
    ....something like that ?! Thanks so much for helping tho! -justin
    --thanks for the help.

  20. #20
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: COBOL forums

    First of all this link:'

    http://publib.boulder.ibm.com/infoce...oc/tpqsm21.htm

    says this:

    If the printed page is held on an intermediate device (a disk, for example), the format can appear different from the expected format when the output is edited or browsed.
    So the ADVANCING 2 might look different on screen then on paper. I don't recall that fact with the COBOL I've worked with - but different O/S could be a factor with that.

    I'll work on your other question shortly.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  21. #21
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: COBOL forums

    Ok - I've posted the bottom part of your code with some ideas - I've put them in bold - hopefully they show up that way

    From what I understand you want to do 2-PRINT-SUMMARY at the "end" of the run - is that right? I hope so...

    Otherwise you wanted to do 2-PRINT-SUMMARY after each student - but I'm not clear on that - I'll assume after the "end" of the run.

    VB Code:
    1. 0088.00            PERFORM UNTIL ARE-THERE-MORE-RECORDS = "NO "
    2. 0089.00                  READ STUDENT-FILE-IN
    3. 0090.00                       AT END MOVE "NO " TO ARE-THERE-MORE-RECORDS
    4. 0091.00                       NOT AT END PERFORM 1-PROCESS-STUDENT
    5. [b]009x.00                       AT END PERFORM 2-PRINT-SUMMARY[/B]  <-- you could put it here
    6. 0092.00                  END-READ
    7. 0093.00            END-PERFORM
    8. [b]009x.00            PERFORM 2-PRINT-SUMMARY[/B] <-- you could also put it here
    9. 0094.00            CLOSE STUDENT-FILE-IN
    10. 0095.00                   STUDENT-FILE-OUT
    11. 0096.00            STOP RUN.
    12. 0097.00        1-PROCESS-STUDENT.
    13. 0098.00            IF LINE-CNTR > 50
    14. 0099.00            THEN
    15. 0100.00                PERFORM  1-2-PRINT-PAGE-HEADINGS
    16. 0101.00            END-IF
    17. 0102.00            MOVE SPACES TO PRINT-REC-OUT
    18. 0103.00            MOVE STUDENT-NAME-IN TO STUDENT-NAME-OUT
    19. 0104.00            MOVE NUMBER-OF-CREDITS-IN TO NUMBER-OF-CREDITS-OUT
    20. 0105.00            IF NUMBER-OF-CREDITS-IN > 12
    21. 0106.00                MOVE FULL-TIME-TUITION TO TUITION-OUT
    22. 0107.00                ADD 1 TO FT-TUITION-CNTR
    23. 0108.00            ELSE
    24. 0109.00                MULTIPLY NUMBER-OF-CREDITS-IN BY PART-TIME-TUITION
    25. 0110.00                            GIVING TUITION-OUT
    26. 0111.00                ADD 1 TO PT-TUITION-CNTR
    27. 0112.00            END-IF
    28. 0113.00            WRITE PRINT-REC-OUT AFTER ADVANCING 1 LINE
    29. 0114.00            ADD 1 TO LINE-CNTR.
    30. 0115.00        1-2-PRINT-PAGE-HEADINGS.
    31. 0116.00            ADD 1 TO PAGE-NUMB
    32. 0117.00            MOVE PAGE-NUMB TO PAGE-OUT
    33. 0118.00            WRITE PRINT-REC-OUT FROM HEADING-LINE-1
    34. 0119.00                  AFTER ADVANCING 1 LINE
    35. 0120.00            WRITE PRINT-REC-OUT FROM HEADING-LINE-2
    36. 0121.00                  AFTER ADVANCING 1 LINE
    37. 0122.00            MOVE 1 TO LINE-CNTR.
    38. 0123.00        2-PRINT-SUMMARY.
    39. 0124.00            IF LINE-CNTR > 50 THEN
    40. 0125.00                PERFORM 2-2-PAGE-HEADINGS
    41. 0126.00            END-IF
    42. 0127.00            MOVE SPACES TO PRINT-REC-OUT
    43. 0128.00            MOVE FT-TUITION-CNTR TO FULL-TIME-NOS.
    44. 0129.00        2-2-PAGE-HEADINGS.
    45.         ****************** End of data ****************************************
    I'm seeing that 2-PRINT-SUMMARY is incomplete - I'm guessing you have ideas on how to finish that. And 2-2-PAGE-HEADINGS is empty - I'm also guessing you will rip the other PAGE-HEADINGS logic and drop it there.

    It seems you are actually in pretty good shape here - you've got most of what you need done already. Am I missing something?

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  22. #22

    Thread Starter
    Addicted Member
    Join Date
    Oct 2004
    Location
    youngstown, oh
    Posts
    202

    Wink Re: COBOL forums

    ok, im in class now.

    i think i have to do this so i can come up with the totals in the 2-print-summary. i need full time number of students, full time number of credits, full time tuitions. and part-time number of students, part time number of credits, and part time tuitions. then total number of students, total number of credits, and total tuitions.

    in 1-process-student where i decide if they are full time student or a part time student. so i can keep track 2-print sum needs the follow infomarion in it
    VB Code:
    1. 0031.00         01  PRINT-SUMM-OUT-PART.
    2. 0032.00             05 PART-TIME-NOS            PIC ZZZ9.
    3. 0033.00             05 PART-TIME-NOC            PIC ZZ,ZZ9.
    4. 0034.00             05 PART-TIME-TUITIONS       PIC $Z,ZZZ,ZZ9.
    5. 0035.00         01  PRINT-SUMM-OUT-FULL.
    6. 0036.00             05 FULL-TIME-NOS            PIC ZZZ9.
    7. 0037.00             05 FULL-TIME-NOC            PIC ZZ,ZZ9.
    8. 0038.00             05 FULL-TIME-TUITIONS       PIC $Z,ZZZ,ZZ9.
    9. 0039.00         01  TOTAL-SUMM.
    10. 0040.00             05 TOTAL-NOS                PIC ZZZ9.
    11. 0041.00             05 TOTAL-NOC                PIC ZZ,ZZ9.
    12. 0042.00             05 TOTAL-TUITIONS           PIC $Z,ZZZ,ZZ9
    .....so again in 1-process-student
    VB Code:
    1. 0097.00        1-PROCESS-STUDENT.
    2. 0098.00            IF LINE-CNTR > 50
    3. 0099.00            THEN
    4. 0100.00                PERFORM  1-2-PRINT-PAGE-HEADINGS
    5. 0101.00            END-IF
    6. 0102.00            MOVE SPACES TO PRINT-REC-OUT
    7. 0103.00            MOVE STUDENT-NAME-IN TO STUDENT-NAME-OUT
    8. 0104.00            MOVE NUMBER-OF-CREDITS-IN TO NUMBER-OF-CREDITS-OUT
    9. 0105.00            IF NUMBER-OF-CREDITS-IN > 12
    10. 0106.00                MOVE FULL-TIME-TUITION TO TUITION-OUT
    11. 0107.00                ADD 1 TO FT-TUITION-CNTR
    12. ***my pcode****
    13.                        move tuition-out to full-time-tuitions (so i can keep track of fulltime tuition)
    14.                        move number-of-credits-out to full time-noc (so i can keep track of full time credit hrs)
    15.                  
    16. 0108.00            ELSE
    17. 0109.00                MULTIPLY NUMBER-OF-CREDITS-IN BY PART-TIME-TUITION
    18. 0110.00                            GIVING TUITION-OUT
    19. 0111.00                ADD 1 TO PT-TUITION-CNTR
    20. ******pcode       move tuition-out to part-time-tutitions
    21.                           move number-of credits-out to part-time-credits.
    22. 0112.00            END-IF
    ...somethign along those lines plus i need to keep track fo the TOTALS total-students, total number of credits and total tutitons,.
    --thanks for the help.

  23. #23

    Thread Starter
    Addicted Member
    Join Date
    Oct 2004
    Location
    youngstown, oh
    Posts
    202

    Re: COBOL forums

    ok, impretty sure i got this wrapped up almost. I worked on it for 2 hrs today towards the end of class and I got some help from a student next to me. ALong with tehir help, and alllll the help i got here, i thik i am close to beign done. I will post my almost finished code up tomm along with anymore questioons i might have. thanks again - justin
    --thanks for the help.

  24. #24

    Thread Starter
    Addicted Member
    Join Date
    Oct 2004
    Location
    youngstown, oh
    Posts
    202

    Re: COBOL forums

    here we go, after all this long hard work. Thsi si it, i'm so glad people here cna help, here it is...
    VB Code:
    1. FMT CB ......-A+++B+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    2.         *************** Beginning of data *************************************
    3. 0001.00        IDENTIFICATION DIVISION.
    4. 0002.00       *************************
    5. 0003.00       ** CIS 3741 LAB 3
    6. 0004.00       **
    7. 0005.00       **FEBUARY 13 - 2007
    8. 0006.00       **********************
    9. 0007.00       *
    10. 0008.00        PROGRAM-ID. LAB3.
    11. 0009.00        ENVIRONMENT DIVISION.
    12. 0010.00        INPUT-OUTPUT SECTION.
    13. 0011.00        FILE-CONTROL.
    14. 0012.00             SELECT STUDENT-FILE-IN
    15. 0013.00                  ASSIGN TO DISK-PESTUDENT.
    16. 0014.00             SELECT STUDENT-FILE-OUT
    17. 0015.00                  ASSIGN TO PRINTER-QPRINT.
    18. 0016.00        DATA DIVISION.
    19. 0017.00        FILE SECTION.
    20. 0018.00        FD   STUDENT-FILE-IN.
    21. 0019.00        01   STUDENT-RECORD-IN.
    22. 0020.00             05 STUDENT-NAME-IN          PIC X(20).
    23. 0021.00             05 NUMBER-OF-CREDITS-IN     PIC 9(2).
    24. 0022.00             05                          PIC X(58).
    25. 0023.00        FD   STUDENT-FILE-OUT.
    26. 0024.00        01   PRINT-REC-OUT.
    27. 0025.00             05 STUDENT-NAME-OUT         PIC X(20).
    28. 0026.00             05                          PIC X(20).
    29. 0027.00             05 NUMBER-OF-CREDITS-OUT    PIC Z9.
    30. 0028.00             05                          PIC X(20).
    31. 0029.00             05 TUITION-OUT              PIC 9(5).
    32. 0030.00             05                          PIC X(14).
    33. 0031.00        WORKING-STORAGE SECTION.
    34. 0032.00        01   ARE-THERE-MORE-RECORDS      PIC XXX   VALUE "YES".
    35. 0033.00        01   PART-TIME-TUITION           PIC 9(3) VALUE 525.
    36. 0034.00        01   FULL-TIME-TUITION           PIC 9(4) VALUE 6300.
    37. 0035.00        01   PART-TIME-TUITION-AMOUNT    PIC 9(4).
    38. 0036.00        01   PT-TUITION-CNTR             PIC 99    VALUE ZEROS.
    39. 0037.00        01   FT-TUITION-CNTR             PIC 99    VALUE ZEROS.
    40. 0038.00        01   TUITION-CNTR                PIC 99    VALUE ZEROS.
    41. 0039.00        01   PT-TUITION-TOTAL            PIC 9(7)  VALUE ZEROS.
    42. 0040.00        01   FT-TUITION-TOTAL            PIC 9(7)  VALUE ZEROS.
    43. 0041.00        01   TUITION-TOTAL               PIC 9(7)  VALUE ZEROS.
    44. 0042.00        01   PT-CREDITS-TOTAL            PIC 9(5)  VALUE ZEROS.
    45. 0043.00        01   FT-CREDITS-TOTAL            PIC 9(5)  VALUE ZEROS.
    46. 0044.00        01   CREDITS-TOTAL               PIC 9(5)  VALUE ZEROS.
    47. 0045.00        01   PAGE-NUMB                   PIC 99    VALUE ZEROS.
    48. 0046.00        01   LINE-CNTR                   PIC 9(2)  VALUE 99.
    49. 0047.00        01   TOTAL-TUITIONS-WS          PIC 9(7)  VALUE ZEROS.
    50. 0048.00        01   TOTAL-NOS-WS               PIC 99 VALUE ZEROS.
    51. 0049.00        01   TOTAL-NOC-WS                PIC 9(5)  VALUE ZEROS.
    52. 0050.00        01   HEADING-LINE-1.
    53. 0051.00             05 DATE-OUT                 PIC XX/XX/XX.
    54. 0052.00             05                          PIC X(54)  VALUE SPACES.
    55. 0053.00             05                          PIC X(13)  VALUE
    56. 0054.00                "PAGE NUMBER:".
    57. 0055.00             05 PAGE-OUT                 PIC ZZ9    VALUE ZEROS.
    58. 0056.00             05                          PIC X(15)  VALUE SPACES.
    59. 0057.00        01   STUDENT-TITLE-LINE.
    60. 0058.00             05                          PIC X(20)  VALUE
    61. 0059.00                "STUDENT SUMMARY".
    62. 0060.00        01   STUDENT-HEADING-LINE.
    63. 0061.00             05                          PIC X(13)  VALUE
    64. 0062.00                "STUDENT NAME".
    65. 0063.00             05                          PIC X(20)  VALUE SPACES.
    66. 0064.00             05                          PIC X(17)  VALUE
    67. 0065.00                "NUMBER OF CREDITS".
    68. 0066.00             05                          PIC X(10)   VALUE SPACES.
    69. 0067.00             05                          PIC X(7)   VALUE
    70. 0068.00                "TUITION".
    71. 0069.00         01  PRINT-SUMM-OUT-PART.
    72. 0070.00             05                          PIC X(10) VALUE
    73. 0071.00                "PART-TIME".
    74. 0072.00             05                          PIC X(8)  VALUE SPACES.
    75. 0073.00             05 PART-TIME-NOS            PIC ZZZ9.
    76. 0074.00             05                          PIC X(18) VALUE SPACES.
    77. 0075.00             05 PART-TIME-NOC            PIC ZZ,ZZ9.
    78. 0076.00             05                          PIC X(18) VALUE SPACES.
    79. 0077.00             05 PART-TIME-TUITIONS       PIC $Z,ZZZ,ZZ9.
    80. 0078.00         01  PRINT-SUMM-OUT-FULL.
    81. 0079.00             05                          PIC X(10) VALUE
    82. 0080.00                "FULL-TIME".
    83. 0081.00             05                          PIC X(8)  VALUE SPACES.
    84. 0082.00             05 FULL-TIME-NOS            PIC ZZZ9.
    85. 0083.00             05                          PIC X(18) VALUE SPACES.
    86. 0084.00             05 FULL-TIME-NOC            PIC ZZ,ZZ9.
    87. 0085.00             05                          PIC X(18) VALUE SPACES.
    88. 0086.00             05 FULL-TIME-TUITIONS       PIC $Z,ZZZ,ZZ9.
    89. 0087.00         01  TOTAL-SUMM.
    90. 0088.00             05                          PIC X(10) VALUE
    91. 0089.00                "TOTALS".
    92. 0090.00             05                          PIC X(8)  VALUE SPACES.
    93. 0091.00             05 TOTAL-NOS                PIC ZZZ9.
    94. 0092.00             05                          PIC X(18) VALUE SPACES.
    95. 0093.00             05 TOTAL-NOC                PIC ZZ,ZZ9.
    96. 0094.00             05                          PIC X(18) VALUE SPACES.
    97. 0095.00             05 TOTAL-TUITIONS           PIC $Z,ZZZ,ZZ9.
    98. 0096.00        01 DATE-IN.
    99. 0097.00           05   YR-IN                    PIC X(2).
    100. 0098.00           05   MO-IN                    PIC X(2).
    101. 0099.00           05   DA-IN                    PIC X(2).
    102. 0100.00        01 DATE-WS                       PIC X(8).
    103. 0101.00        01 DATE-TEMP REDEFINES DATE-WS.
    104. 0102.00           05   MO-TEMP                  PIC X(2).
    105. 0103.00           05   DA-TEMP                  PIC X(2).
    106. 0104.00           05   YR-TEMP                  PIC X(2).
    107. 0105.00        01 HEADING-LINE-3.
    108. 0106.00           05                            PIC X(13) VALUE SPACES.
    109. 0107.00           05                            PIC X(18) VALUE
    110. 0108.00                "NUMBER OF STUDENTS".
    111. 0109.00           05                            PIC X(8) VALUE SPACES.
    112. 0110.00           05                            PIC X(17) VALUE
    113. 0111.00                "NUMBER OF CREDITS".
    114. 0112.00           05                            PIC X(8) VALUE SPACES.
    115. 0113.00           05                            PIC X(8) VALUE
    116. 0114.00                "TUITION".
    --thanks for the help.

  25. #25

    Thread Starter
    Addicted Member
    Join Date
    Oct 2004
    Location
    youngstown, oh
    Posts
    202

    Re: COBOL forums

    VB Code:
    1. 0115.00        PROCEDURE DIVISION.
    2. 0116.00        0-MAIN-MODULE.
    3. 0117.00            OPEN INPUT STUDENT-FILE-IN
    4. 0118.00                 OUTPUT STUDENT-FILE-OUT
    5. 0119.00            ACCEPT DATE-IN FROM DATE
    6. 0120.00            MOVE MO-IN TO MO-TEMP
    7. 0121.00            MOVE DA-IN TO DA-TEMP
    8. 0122.00            MOVE YR-IN TO YR-TEMP
    9. 0123.00            MOVE DATE-WS TO DATE-OUT
    10. 0124.00            PERFORM UNTIL ARE-THERE-MORE-RECORDS = "NO "
    11. 0125.00                  READ STUDENT-FILE-IN
    12. 0126.00                       AT END MOVE "NO " TO ARE-THERE-MORE-RECORDS
    13. 0127.00                       NOT AT END PERFORM 1-PROCESS-STUDENT
    14. 0128.00                  END-READ
    15. 0129.00            END-PERFORM
    16. 0130.00            PERFORM 2-PRINT-SUMMARY
    17. 0131.00            CLOSE STUDENT-FILE-IN
    18. 0132.00                   STUDENT-FILE-OUT
    19. 0133.00            STOP RUN.
    20. 0134.00        1-PROCESS-STUDENT.
    21. 0135.00            IF LINE-CNTR > 50
    22. 0136.00            THEN
    23. 0137.00                PERFORM  1-2-PRINT-PAGE-HEADINGS
    24. 0138.00            END-IF
    25. 0139.00            MOVE SPACES TO PRINT-REC-OUT
    26. 0140.00            MOVE STUDENT-NAME-IN TO STUDENT-NAME-OUT
    27. 0141.00            MOVE NUMBER-OF-CREDITS-IN TO NUMBER-OF-CREDITS-OUT
    28. 0142.00            IF NUMBER-OF-CREDITS-IN >= 12
    29. 0143.00                MOVE FULL-TIME-TUITION    TO TUITION-OUT
    30. 0144.00                ADD FULL-TIME-TUITION     TO FT-TUITION-TOTAL
    31. 0145.00                ADD 1                     TO FT-TUITION-CNTR
    32. 0146.00                ADD NUMBER-OF-CREDITS-IN  TO FT-CREDITS-TOTAL
    33. 0147.00            ELSE
    34. 0148.00                MULTIPLY NUMBER-OF-CREDITS-IN BY PART-TIME-TUITION
    35. 0149.00                            GIVING PART-TIME-TUITION-AMOUNT
    36. 0150.00                MOVE PART-TIME-TUITION-AMOUNT TO TUITION-OUT
    37. 0151.00                ADD PART-TIME-TUITION-AMOUNT  TO PT-TUITION-TOTAL
    38. 0152.00                ADD 1                         TO PT-TUITION-CNTR
    39. 0153.00                ADD NUMBER-OF-CREDITS-IN      TO PT-CREDITS-TOTAL
    40. 0154.00            END-IF
    41. 0155.00                ADD PT-TUITION-TOTAL TO FT-TUITION-TOTAL
    42. 0156.00                    GIVING TOTAL-TUITIONS-WS
    43. 0157.00                ADD PT-TUITION-CNTR TO FT-TUITION-CNTR
    44. 0158.00                    GIVING TOTAL-NOS-WS
    45. 0159.00                ADD PT-CREDITS-TOTAL TO FT-CREDITS-TOTAL
    46. 0160.00                    GIVING TOTAL-NOC-WS
    47. 0161.00            WRITE PRINT-REC-OUT AFTER ADVANCING 1 LINE
    48. 0162.00            ADD 1 TO LINE-CNTR.
    49. 0163.00        1-2-PRINT-PAGE-HEADINGS.
    50. 0164.00            ADD 1 TO PAGE-NUMB
    51. 0165.00            MOVE PAGE-NUMB TO PAGE-OUT
    52. 0166.00            WRITE PRINT-REC-OUT FROM HEADING-LINE-1
    53. 0167.00                  AFTER ADVANCING 2 LINES
    54. 0168.00            WRITE PRINT-REC-OUT FROM STUDENT-TITLE-LINE
    55. 0169.00            WRITE PRINT-REC-OUT FROM STUDENT-HEADING-LINE
    56. 0170.00            MOVE 1 TO LINE-CNTR.
    57. 0171.00        2-PRINT-SUMMARY.
    58. 0172.00            IF LINE-CNTR < 50 THEN
    59. 0173.00                PERFORM 2-2-PRINT-PAGE-HEADINGS
    60. 0174.00            END-IF
    61. 0175.00            MOVE FT-CREDITS-TOTAL TO FULL-TIME-NOC
    62. 0176.00            MOVE FT-TUITION-TOTAL TO FULL-TIME-TUITIONS
    63. 0177.00            MOVE FT-TUITION-CNTR  TO FULL-TIME-NOS
    64. 0178.00            MOVE PT-CREDITS-TOTAL TO PART-TIME-NOC
    65. 0179.00            MOVE PT-TUITION-TOTAL TO PART-TIME-TUITIONS
    66. 0180.00            MOVE PT-TUITION-CNTR TO PART-TIME-NOS
    67. 0181.00            MOVE TOTAL-TUITIONS-WS TO TOTAL-TUITIONS
    68. 0182.00            MOVE TOTAL-NOS-WS  TO TOTAL-NOS
    69. 0183.00            MOVE TOTAL-NOC-WS  TO TOTAL-NOC
    70. 0184.00            WRITE PRINT-REC-OUT FROM PRINT-SUMM-OUT-PART
    71. 0185.00            WRITE PRINT-REC-OUT FROM PRINT-SUMM-OUT-FULL
    72. 0186.00            WRITE PRINT-REC-OUT FROM TOTAL-SUMM.
    73. 0187.00            ADD 1 TO PAGE-NUMB
    74. 0188.00            MOVE PAGE-NUMB TO PAGE-OUT.
    75. 0189.00        2-2-PRINT-PAGE-HEADINGS.
    76. 0190.00            ADD 1 TO PAGE-NUMB
    77. 0191.00            MOVE PAGE-NUMB TO PAGE-OUT
    78. 0192.00            WRITE PRINT-REC-OUT FROM HEADING-LINE-3
    79. 0193.00                  AFTER ADVANCING 2 LINES.
    80.         ****************** End of data ****************************************
    and here's my output...
    VB Code:
    1. 02/16/07                                                      PAGE NUMBER:   1
    2. STUDENT SUMMARY
    3. STUDENT NAME                     NUMBER OF CREDITS          TUITION
    4. Johnson, Derek                          12                    06300
    5. Murray, Susan                           11                    05775
    6. Hartman, Tom                            13                    06300
    7. Wilson, Lisa                            12                    06300
    8. Browne, Dan                             18                    06300
    9. Roberts, Doug                           16                    06300
    10. Smith, Arlene                            8                    04200
    11.              NUMBER OF STUDENTS        NUMBER OF CREDITS        TUITION
    12. PART-TIME            2                      19                  $    9,975
    13. FULL-TIME            5                      71                  $   31,500
    14. TOTALS               7                      90                  $   41,475
    ........thansk for all the help. I'm usre this won't be my last COBOL problem i need help with thansk thanks thanks...- justin
    --thanks for the help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width