Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Will this program abend or not?

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

New User


Joined: 24 Oct 2006
Posts: 9
Location: delhi

PostPosted: Wed Jun 04, 2008 3:06 pm    Post subject: Will this program abend or not?
Reply with quote

Hi,

Just need a little help. I came across this question thru someone.

Suppose I have a file and that has jut 1 record which read and then written and the record at the time of writing is PIC 9(7). Now at the time of writing it if i give the value 123456 within quotes, will the program abend or not?

Acc to me it will abend.
Please let me know.
bye
Back to top
View user's profile Send private message

the_gautam

Active User


Joined: 05 Jun 2005
Posts: 165
Location: Bangalore

PostPosted: Wed Jun 04, 2008 3:28 pm    Post subject:
Reply with quote

Quote:
the record at the time of writing is PIC 9(7)

I guess the PICTURE clause of the record should be the same through out the program.

Please explain your problem bit more...
Back to top
View user's profile Send private message
harpreet9

New User


Joined: 24 Oct 2006
Posts: 9
Location: delhi

PostPosted: Wed Jun 04, 2008 3:31 pm    Post subject: Reply to: will this program abend or not?
Reply with quote

yup its same thruout the program its just that at the time of defining the variable in the input file i have not set the value. i am setting the value in the procedure division only and the value is "123456".
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Jun 04, 2008 3:49 pm    Post subject: Reply to: will this program abend or not?
Reply with quote

harpreet,

Quote:
i am setting the value in the procedure division only and the value is "123456".


Are you using the VALUE clause for setting the value. If yes, it will lead to compilation error.

Write a small program, test and confirm it.
Back to top
View user's profile Send private message
the_gautam

Active User


Joined: 05 Jun 2005
Posts: 165
Location: Bangalore

PostPosted: Wed Jun 04, 2008 3:53 pm    Post subject:
Reply with quote

please post your code
Back to top
View user's profile Send private message
harpreet9

New User


Joined: 24 Oct 2006
Posts: 9
Location: delhi

PostPosted: Wed Jun 04, 2008 3:58 pm    Post subject:
Reply with quote

hey Aaru Vedam
thanks...its done
thank u
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Jun 10, 2008 3:43 pm    Post subject:
Reply with quote

Hi,

Please share the solution used.
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 The same REXX program doesnt work for... jackzhang75 CLIST & REXX 5 Wed Dec 06, 2017 2:51 am
No new posts Calling IKJEFT01 program from Rexx upendrasri CLIST & REXX 8 Wed Nov 15, 2017 4:27 pm
No new posts ASP3 ABEND IN CICS Vedant CICS 0 Fri Oct 20, 2017 3:18 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us