Moving a larger COMP3 field into a smaller COMP3 filed



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Moving a larger COMP3 field into a smaller COMP3 filed

Postby SMain » Tue Jan 31, 2012 2:55 pm

Hi ,

I have a variable defined in comp3 of length s9(09)v99 and I want to move it to another variable of length s9(11)v99
SMain
 
Posts: 7
Joined: Tue Jan 31, 2012 2:23 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Moving a larger COMP3 field into a smaller COMP3 filed

Postby enrico-sorichetti » Tue Jan 31, 2012 3:25 pm

Moving a larger COMP3 field into a smaller COMP3 filed
I have a variable defined in comp3 of length s9(09)v99 and I want to move it to another variable of length s9(11)v99


what makes You think that an s9(11)v99 <thingy> is smaller than an s9(09)v99 one ???

whatever... it should not be difficult to test what happens
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Moving a larger COMP3 field into a smaller COMP3 filed

Postby SMain » Tue Jan 31, 2012 3:35 pm

oops .... I want to move S9(11)v99 to S9(09)v99 .. both are comp3
SMain
 
Posts: 7
Joined: Tue Jan 31, 2012 2:23 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Moving a larger COMP3 field into a smaller COMP3 filed

Postby BillyBoyo » Tue Jan 31, 2012 3:52 pm

As long as there is nothing you mind truncating to the left, what's the problem?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Moving a larger COMP3 field into a smaller COMP3 filed

Postby SMain » Tue Jan 31, 2012 4:21 pm

I'm getting SOC7
SMain
 
Posts: 7
Joined: Tue Jan 31, 2012 2:23 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Moving a larger COMP3 field into a smaller COMP3 filed

Postby prino » Tue Jan 31, 2012 4:32 pm

S0C7 has nothing to do with the move, but everything with invalid data.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times

Re: Moving a larger COMP3 field into a smaller COMP3 filed

Postby BillyBoyo » Tue Jan 31, 2012 7:49 pm

You can't get a S0C7 by moving a larger field with valid contents to a smaller field.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post