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
 

 

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 Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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