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



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

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

Postby Naveen@Uppi » Fri Oct 12, 2012 1:11 pm

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
Naveen@Uppi
 
Posts: 36
Joined: Wed Jul 23, 2008 6:49 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby BillyBoyo » Fri Oct 12, 2012 1:39 pm

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
/*
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

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

Postby skolusu » Fri Oct 12, 2012 10:01 pm

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?
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

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

Postby Naveen@Uppi » Wed Oct 17, 2012 10:04 pm

Thanks for response. I corrected the OUTRE.

I am using FTP for the file transfer.

Regards,
Naveen N
Naveen@Uppi
 
Posts: 36
Joined: Wed Jul 23, 2008 6:49 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby BillyBoyo » Wed Oct 17, 2012 10:23 pm

And everything is OK now?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post