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 Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm
No new posts pre-compiler for program in an HFS Pedro DB2 0 Fri Jun 23, 2017 11:13 pm
No new posts Compiling program in endeavor for tra... RALAKKAL Compuware & Other Tools 4 Mon Jun 05, 2017 8:27 pm
No new posts C03 ABEND sjiraga PL/I & Assembler 1 Thu Jun 01, 2017 4:51 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am


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