Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to set the "NOTERM" to "TERM"

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
shaham25

New User


Joined: 20 Apr 2006
Posts: 6
Location: chennai

PostPosted: Thu Apr 20, 2006 6:55 pm    Post subject: How to set the "NOTERM" to "TERM"
Reply with quote

Hi,
I am using IBM Mainframe COBOL, when i try to compile a following simple COBOL program


*************************************************
000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID. TEST1.
000300 ENVIRONMENT DIVISION.
000400 DATA DIVISION.
000500 WORKING-STORAGE SECTION.
000600 01 FIRST-NUMBER PIC 99.
000700 01 SECOND-NUMBER PIC 99.
000800 01 RESULT-NUMBER PIC 999.
000900 PROCEDURE DIVSION.
000910 *PROGRAM-BEGIN.
001000 DISPLAY "THE FIRST NUMBER IS".
001100 ACCEPT FIRST-NUMBER.
001200 DISPLAY "THE SECOND NUMBER IS".
001300 ACCEPT SECOND-NUMBER.
001400 COMPUTE=FIRST-NUMBER+SECOND-NUMBER.
001500 DISPLAY "THE RESULT IS" RESULT-NUMBER.
001510 *PROGRAM-DONE.
001600 STOP RUN.

***********************************************
with the following compile JCL

*************************************************
//COMPJCL JOB 'IBMMFS','SHA',CLASS=9,MSGCLASS=0,NOTIFY=&SYSUID
//STEP1 EXEC IGYWCL,
// PARM=('XREF,TERM,OFFSET,MAP,OPT,APOST,RENT,DYNAM,DATA(24)',
// '')
//SYSIN DD DISP=SHR,
// DSN=CERATST.PGM.CBL(TEST1)
//LKED.SYSLMOD DD DISP=SHR,
// DSN=CERATST.LINKLIB(TEST1)
//SYSPRINT DD SYSOUT=*
//*

***************************

I am getting the return code 12 and the error message is

"File "SYSTERM" could not be opened. The "TERM" option was reset to
"NOTERM"."

and this is the Compile and Linkedit program which i used.

*****************************************
//IGYWCL PROC
//*****************************************************************
//*
//* IBM COBOL FOR MVS & VM
//*
//* COMPILE AND LINK EDIT A COBOL PROGRAM
//*
//* RELEASE LEVEL: 01.02.00 (VERSION.RELEASE.MODIFICATION LEVEL)
//*
//*****************************************************************
//COBOL EXEC PGM=IGYCRCTL,REGION=2048K
//STEPLIB DD DSNAME=SYS3.LE370.R150.SIGYCOMP,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSLIN DD DSNAME=&&LOADSET,UNIT=SYSDA,
// DISP=(MOD,PASS),SPACE=(TRK,(3,3)),
// BLKSIZE=27920
//SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT2 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT5 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT6 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT7 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//IFCOMP IF (RC < 8) THEN
//LKED EXEC PGM=HEWL,REGION=1024K
//SYSLIB DD DSNAME=SYS1.LE.SCEELKED,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSLIN DD DSNAME=&&LOADSET,DISP=(OLD,DELETE)
// DD DDNAME=SYSIN
//SYSLMOD DD DSNAME=&&GOSET(GO),
// SPACE=(TRK,(10,10,1)),
// UNIT=SYSDA,DISP=(MOD,PASS)
//SYSUT1 DD UNIT=SYSDA,SPACE=(TRK,(10,10))
//IFCOMP ENDIF

*************************************************88
please tell me where the problem is and how to set the "NOTERM" to "TERM"
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Thu Apr 20, 2006 7:22 pm    Post subject: Re: ERROR in COBOL COMPILATION
Reply with quote

==> 000900 PROCEDURE DIVSION. <==

Might the typo have something to do with the error?
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Thu Apr 20, 2006 8:14 pm    Post subject: Re: ERROR in COBOL COMPILATION
Reply with quote

Hello shaham25,

New to the forum, and I think new to programming, at least COBOL. Welcome to the Forum, you will find many members with a wealth of knowledge and a willingness to help.

Before I get into your questions, I?d like to say one thing about programming that is hard learned by some people. The computer doesn?t necessarily do what you want it to do. It does what you tell it to do.

For your first question.

Add the following to the compile step:

//SYSTERM DD SYSOUT=*

The TERM option says to output diagnostic messaged to the SYSTERM dataset, and you didn't have one, so it changed to NOTERM.

Also check the changes I have made to your program. If you don?t understand why some of these changes were made, please ask. Or, if you have problems running this, also please come back.

Code:

WORKING-STORAGE SECTION.                                     
                                                               
 01 FIRST-NUMBER PIC 99.                                       
 01 SECOND-NUMBER PIC 99.                                     
 01 RESULT-NUMBER PIC 999.                                     
                                                               
 LINKAGE SECTION.                                             
 PROCEDURE DIVISION.                                           
                                                               
*PROGRAM-BEGIN.                                               
     ACCEPT FIRST-NUMBER.                                     
     DISPLAY "THE FIRST NUMBER IS " FIRST-NUMBER.             
     ACCEPT SECOND-NUMBER.                                     
     DISPLAY "THE SECOND NUMBER IS " SECOND-NUMBER.           
     COMPUTE RESULT-NUMBER = FIRST-NUMBER + SECOND-NUMBER.     
     DISPLAY "THE RESULT IS " RESULT-NUMBER.                   
*PROGRAM-DONE.                                                 
     STOP RUN.


Good luck in programming,

Dave
Back to top
View user's profile Send private message
shaham25

New User


Joined: 20 Apr 2006
Posts: 6
Location: chennai

PostPosted: Fri Apr 21, 2006 1:08 pm    Post subject: Re: ERROR in COBOL COMPILATION
Reply with quote

Thanks superk and david, it's working
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Sat Apr 22, 2006 12:33 am    Post subject: Re: ERROR in COBOL COMPILATION
Reply with quote

Dave, as you may have read in other posts, I'm not a programmer, so I don't spend much time in the COBOL world. However, it struck me as odd when looking the original posted code that it wasn't even syntactically correct in the ISPF Editor, so I'm suprised that somone would have even atempted to compile it.

Also, whenever I've delved into the COBOL or Assembler world, I've always compiled the program in the foreground. Do modern programmers really submit batch compiles?
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Sat Apr 22, 2006 1:36 am    Post subject: Re: ERROR in COBOL COMPILATION
Reply with quote

Superk,

I think one of shaham25's problems might be that he probably wasn't getting any diagnostic messages because the SYSTERM DD was missing. This program looks like it's akin to a 'HELLO WORLD' first program, and I give considerable latitude to beginning programmers, which the forum seems to be full of. But that?s the point right?

I thought about letting shaham25 struggle with the syntax alone, and sometimes that?s that best way, but I?ve also learned that correcting can be a learning experience also.

I?d like to think of myself as a modern programmer, though by many criteria I?d be considered an antique. (Maybe I can get one of those ?historical? license plates to wear on my back?) I do all of my compiles through ENDEVOR, so all are batch compiles.

On a personal note, I?d like to commend you and several of the other members on the breadth and depth of your knowledge. I?ve enjoyed my participation in the forum and have learned many tricks by reading the posts.

Thanks,
Dave
Back to top
View user's profile Send private message
iamyinhe

New User


Joined: 27 Apr 2006
Posts: 7

PostPosted: Fri May 05, 2006 8:14 pm    Post subject: Re: ERROR in COBOL COMPILATION
Reply with quote

At line 001400,the 'compute' statement is wrong.I think you want to write like 'compute result_number = first_number + second_number'
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts RC 20 for Address ISPEXEC "ISRED... pkmurali CLIST & REXX 3 Sun Apr 16, 2017 11:30 pm
No new posts Amount field is getting corrupted whe... thesumitk SYNCSORT 5 Tue Oct 18, 2016 8:20 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us