Page 1 of 1

OUTREC for field conversion from PD to ZD and ZD to PD

PostPosted: Fri Oct 12, 2012 1:11 pm
by Naveen@Uppi
Hi All,

I need help for 2 things:
I have a file one field is packed decimal (PIC S9(13)V9(5) COMP-3).
1) I need to convert Packed decimal it into readable format (Zoned decimal).
2) Transfer into note pad, load in to oracle database make some changes
3) Bring it back to mainframes and convert in back to Packed decimal.
Issue: When I convert from readable format (Zoned decimal) to packed decimal, in the output the starting position has 00. Also the conversion is ending at 91 instead of 90.
Please help to resolve the issue. PFb for the details:
Field Details:
Filed1 Start 1 Length 80 PIC X (80)
Field2 Start 81 length 10 PIC S9(13)V9(5) COMP-3
Field 3 Start 91 length 45 PICX(45)

1)
I used OUTREC fields to convert the packed decimal field:
OPTION COPY                               
OUTREC FIELDS=(1,80,X,                     
               81,10,PD,TO=ZD,LENGTH=20,X,
               91,44,X)                   


Input before conversion:
----+----9
**********
       l 
0000014900
000028930C


Input after conversion:
-
---+----9----+----0-
*********************
 00000000002184993000
4FFFFFFFFFFFFFFFFFFFF
000000000002184993000

2) When I converting back from readable format (Zoned decimal) to Packed decimal, The output is not correct.

PFB the JCL, input and output

OPTION COPY                               
OUTREC FIELDS=(1,80,X,                   
               82,20,ZD,TO=PD,LENGTH=10,X,
               102,45,X)                 



Input FIle:
----+----9----+----0-
*********************
 00000000002184993000
4FFFFFFFFFFFFFFFFFFFF
000000000002184993000


----+----9-
**********
        l 
40000014900
0000028930C


Regards,
Navee N

Code'd

Re: OUTREC for field conversion from PD to ZD and ZD to PD

PostPosted: Fri Oct 12, 2012 1:39 pm
by BillyBoyo
Can you run this please, so that we can check what level of sort you have installed. Paste all the sysout messages from the step, using the Code tags please (as have been applied to your post).

//S1 EXEC PGM=ICEMAN
//SYSOUT   DD SYSOUT=*
//SORTIN DD *
RECORD
/*
//SORTOUT DD DUMMY
//SYSIN   DD   *
  OPTION COPY
/*

Re: OUTREC for field conversion from PD to ZD and ZD to PD

PostPosted: Fri Oct 12, 2012 10:01 pm
by skolusu
Naveen@Uppi wrote:Hi All,

I need help for 2 things:
I have a file one field is packed decimal (PIC S9(13)V9(5) COMP-3).
1) I need to convert Packed decimal it into readable format (Zoned decimal).
2) Transfer into note pad, load in to oracle database make some changes
3) Bring it back to mainframes and convert in back to Packed decimal.
Issue: When I convert from readable format (Zoned decimal) to packed decimal, in the output the starting position has 00. Also the conversion is ending at 91 instead of 90.


What makes you think the changes you made aren't causing the problem? You are sending off the data to another platform and then making changes and you expect the values to be same? There is a lot that can happen in between. How are you transferring data between systems? FTP ? NDM?

Re: OUTREC for field conversion from PD to ZD and ZD to PD

PostPosted: Wed Oct 17, 2012 10:04 pm
by Naveen@Uppi
Thanks for response. I corrected the OUTRE.

I am using FTP for the file transfer.

Regards,
Naveen N

Re: OUTREC for field conversion from PD to ZD and ZD to PD

PostPosted: Wed Oct 17, 2012 10:23 pm
by BillyBoyo
And everything is OK now?