IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Will this program abend or not?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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: 1287
Location: Chennai, India

PostPosted: Wed Jun 04, 2008 3:49 pm
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
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
Reply with quote

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

Superior Member


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

PostPosted: Tue Jun 10, 2008 3:43 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts ISAM and abend S03B JCL & VSAM 9
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top