On Thu, 16 Oct 2014 15:15:46 -0500, Ron Thomas <[email protected]> wrote:

>Hi.
>
>We have the below layouts in the module  
>
>AS-IS Version of the code
>
>03  MIA-KEY.                                    
>    05  MIA-SUFFIX       PIC X(2)  VALUE 'IT'.  
>    05  MIA-ITEM-NUMBER.                        
>      07  MIA-WPM-DEPT   PIC 9(2).              
>      07  MIA-WM-DEPT    PIC 9(2).              
>      07  MIA-ITEM-SEQ   PIC X(5).              
>    05  MIA-KEY-FILLER   PIC X(5)  VALUE SPACES.
> 
>TO-BE Version of the code
> 
>
>03  MIA-KEY.
>05  MIA-SUFFIX       PIC X(2)  VALUE 'IT'.   
>05  MIA-ITEM-NUMBER  PIC 9(9).                   
>05  MIA-KEY-FILLER   PIC X(5)  VALUE SPACES. 
> 
>  
>01  OUTFILE-REC.                       
>    03  ITEM-NUMB-OUT        PIC S9(9).
>    03  MBM-CODE-OUT         PIC X.    
> 
>This is how now we are seeing the data  after moving to OUTFILE . Here we are 
>seeing the data not in the correct format. Please let me know do we need to 
>change any thing in the declaration ?
>
>
>ITEM-NUMB-OUT MBM-CODE-OUT       
>9/SNUM        1/AN               
>(1-9)         (10-10)            
>1------------ 2-----------       
>*********************************
>00010091H     P                  
>FFFFFFFFC      D                  
>000100918     7                  
>---------------------------------
>00010192D     M                  
>FFFFFFFFC      D                  
>000101924     4   
>
>Thanks
>Ron T               

Assuming you are moving MIA-ITEM-NUMBER to ITEM-NUMB-OUT, in the AS-IS version 
of the code, you are moving a Group Item to an Elementary Item, so this is 
Group Move.  For Group Moves, no data conversion takes place, the data is move 
as is.  Since the fields are the same length, no padding or truncation takes 
place.

In the TO-BE version of the code, both items are Elementary Items so an 
Elementary Move is done and data conversion will take place.  Since the output 
field is signed, COBOL generates extra instructions to make sure the output 
field contains a valid sign.  If you want the data as is, then change 
ITEM-NUMB-OUT to be PIC 9(9).

-- 
Dale R. Smith 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to