Page 1 of 1

Sysout - problem

PostPosted: Wed Sep 29, 2010 11:21 pm
by GUI1504
Hello everybody, i've been reported an error lik these, but "magically" it was resolved. Now, I can't see the sysout item on SDSF > Status of Job. Can anyone help me?

On S>ST page just appears: JESMSGLG, JESJCL, JESYSMSGS, SYSPRINT and SYSLOUT

JCL
//GUI1504J    JOB (GUI1504),GUI1504,CLASS=A,MSGCLASS=X,NOTIFY=GUI1504
//PROCLIB     JCLLIB ORDER=IBMMFS.PROC.IBMCOB                       
//COMPILE     EXEC IGYWCG                                           
//ENTRADA     DD DSN=GUI1504.RDWRT.ENTRADA,DISP=SHR                 
//COBOL.SYSIN DD DSN=GUI1504.RDWRT.COBOL,DISP=SHR                   
//SYSPRINT    DD SYSOUT=*                                           
/*                                                                   


COBOL
       IDENTIFICATION DIVISION.
       PROGRAM-ID. RDWRT.
      *
      *
       ENVIRONMENT DIVISION.
      *
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
           SELECT ENTRADA
           ASSIGN TO ENTRADA
           FILE STATUS IS WS-STATUS.
      *
      *
       DATA DIVISION.
      *
       FILE SECTION.
       FD ENTRADA
           LABEL RECORD IS STANDARD
           RECORDING MODE IS F
           RECORD CONTAINS 80 CHARACTERS.
      *
       01 REG-ENTRADA PIC X(80).
      *
       WORKING-STORAGE SECTION.
      *
       01 WS-STATUS          PIC X(02).
       01 REGISTRO.
          10 REG-NOME        PIC X(30).
          10 REG-IDADE       PIC 9(02).
          10 FILLER          PIC X(48).
       01 REG-SAIDA.
          10 REG-SAIDA-NOME  PIC X(30).
          10 FILLER          PIC X(15).
          10 REG-SAIDA-IDADE PIC 9(02).
          10 FILLER          PIC X(13).
          10 REG-SAIDA-DESCR PIC X(15).
       01 CONTADORES.
          10 IDOSO           PIC 9(2).
          10 ADULTO          PIC 9(2).
          10 ADULTO-JOVEM    PIC 9(2).
          10 ADOLESCENTE     PIC 9(2).
          10 CRIANCA         PIC 9(2).
          10 GERAL           PIC 9(2).
      *
      *
       PROCEDURE DIVISION.
      *
       1000-MAIN.
           OPEN INPUT ENTRADA
           READ ENTRADA INTO REGISTRO AT END
           INITIALIZE CONTADORES
           PERFORM 2000-COMP
           COMPUTE GERAL = IDOSO + ADULTO + ADULTO-JOVEM + CRIANCA
                   + ADOLESCENTE
           PERFORM 3000-DISPLAY
           CLOSE ENTRADA.
           STOP RUN.
      *
       2000-COMP.
           IF REG-IDADE GREATER THAN 60
              MOVE REG-NOME TO REG-SAIDA-NOME
              MOVE REG-IDADE TO REG-SAIDA-IDADE
              MOVE "IDOSO" TO REG-SAIDA-DESCR
              DISPLAY 'NOME: ' REG-SAIDA-NOME
              DISPLAY 'IDADE: ' REG-SAIDA-IDADE
              DISPLAY 'DESCRICAO: ' REG-SAIDA-DESCR
              DISPLAY ' '
              ADD 1 TO IDOSO
           ELSE
           IF REG-IDADE GREATER THAN 40
              MOVE "ADULTO" TO REG-SAIDA-DESCR
              DISPLAY 'NOME: ' REG-SAIDA-NOME
              DISPLAY 'IDADE: ' REG-SAIDA-IDADE
              DISPLAY 'DESCRICAO: ' REG-SAIDA-DESCR
              DISPLAY ' '
              ADD 1 TO ADULTO
           ELSE
           IF REG-IDADE GREATER THAN 20
              MOVE "ADULTO JOVEM" TO REG-SAIDA-DESCR
              DISPLAY 'NOME: ' REG-SAIDA-NOME
              DISPLAY 'IDADE: ' REG-SAIDA-IDADE
              DISPLAY 'DESCRICAO: ' REG-SAIDA-DESCR
              DISPLAY ' '
              ADD 1 TO ADULTO-JOVEM
           ELSE
           IF REG-IDADE GREATER THAN 14
              MOVE "ADOLESCENTE" TO REG-SAIDA-DESCR
              MOVE "ADULTO JOVEM" TO REG-SAIDA-DESCR
              DISPLAY 'NOME: ' REG-SAIDA-NOME
              ADD 1 TO ADOLESCENTE
           ELSE
              MOVE "CRIANCA" TO REG-SAIDA-DESCR
              DISPLAY 'NOME: ' REG-SAIDA-NOME
              DISPLAY 'IDADE: ' REG-SAIDA-IDADE
              DISPLAY 'DESCRICAO: ' REG-SAIDA-DESCR
              DISPLAY ' '
              ADD 1 TO CRIANCA
           END-IF
           END-IF
           END-IF
           END-IF
           .
       3000-DISPLAY.
           DISPLAY 'IDOSOS........: ' IDOSO
           DISPLAY 'ADULTOS.......: ' ADULTO
           DISPLAY 'ADULTOS JOVENS: ' ADULTO-JOVEM
           DISPLAY 'ADOLESCENTES..: ' ADOLESCENTE
           DISPLAY 'CRIANCAS......: ' CRIANCA
           DISPLAY 'GERAL.........: ' GERAL
           .


Re: Sysout - problem

PostPosted: Wed Sep 29, 2010 11:39 pm
by NicC
Is this the same problem as your other post, just re-worded? The answers are the same.

Provide the JESMSGLG
Provide the JESJCL
Provide the JESYSMSG

Re: Sysout - problem

PostPosted: Thu Sep 30, 2010 12:01 am
by NicC
Suggest you look at the JCL for the step that executes your program. This step is named GO and is at the end of the procedure. Then look at the SYSOUT statement in that step.

Re: Sysout - problem

PostPosted: Thu Sep 30, 2010 1:33 am
by dick scherrer
Hello,

Said slightly differently - as long as you submit incorrect jcl, you will get incorrect results. . .

Why do you believe it is ok to sometimes specify the "Stepnam.DDname" and other times only the DDname. . .

This is a jcl issue, not code as far as i can determine.

Re: Sysout - problem

PostPosted: Thu Sep 30, 2010 8:42 pm
by GUI1504
Hello buddies, i'm sorry, i'm new at COBOL. I've been solved this question, the SYSOUT doesn't appears because the display don't execute, it's problem with at end, now it's solved, thanks

Re: Sysout - problem

PostPosted: Fri Oct 01, 2010 12:24 am
by dick scherrer
Hello,

Good to hear it is working.

Part of the situation is that cobol is just now being learned (we all had to learn once upon a time :) ).

Another issue is the lack of understanding of how jcl works. If you continue to use inconsistent/incorrect jcl, there will be lots more problems that cannot be fixed in the code. . .