how to change a PD to ZD including date using sort



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

how to change a PD to ZD including date using sort

Postby erameshkumarkgm » Wed Aug 04, 2010 7:03 pm

Hi ,
please see my below record format and help in changing from PD to ZD.
PIC X(08).
PIC X(09).
SEQ-NUM PIC S9(03) COMP-3.
PIC X(03).
PIC 9(04).
PIC X(03).
DATE PIC S9(09) COMP-3.
TIME PIC S9(09) COMP-3.
PIC X(02).
PIC X(03).
DATE-New PIC S9(09) COMP-3.
TIME-New PIC S9(09) COMP-3.
PIC X(02).
PIC X(01).
FILLER PIC X(143).
PIC X(50).

Total record length is 250.
erameshkumarkgm
 
Posts: 9
Joined: Thu Jul 29, 2010 11:38 am
Has thanked: 0 time
Been thanked: 0 time

Re: how to change a PD to ZD including date using sort

Postby skolusu » Wed Aug 04, 2010 10:52 pm

erameshkumarkgm ,

ok what is the expected OUTPUT layout?
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: how to change a PD to ZD including date using sort

Postby erameshkumarkgm » Thu Aug 05, 2010 10:39 am

skolusu wrote:erameshkumarkgm ,

ok what is the expected OUTPUT layout?



I want the comp3 variabales to be converted to ZD . Layout
PIC X(08).
PIC X(09).
SEQ-NUM PIC 9(04).
PIC X(03).
PIC 9(04).
PIC X(03).
DATE PIC 9(10).
TIME PIC 9(10) .
PIC X(02).
PIC X(03).
DATE-New PIC 9(10).
TIME-New PIC 9(10).
PIC X(02).
PIC X(01).
FILLER PIC X(143).
PIC X(50).

Total record length is 272.
The Packed data should be convert in to normal numeric data.
erameshkumarkgm
 
Posts: 9
Joined: Thu Jul 29, 2010 11:38 am
Has thanked: 0 time
Been thanked: 0 time

Re: how to change a PD to ZD including date using sort

Postby NicC » Thu Aug 05, 2010 5:05 pm

you have 10 characters for the date so presumably you want a format like ccyy-mm-dd or is it dd-mm-ccyy? or do you want spaces or / instead of -?
And what about the format of the time?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: how to change a PD to ZD including date using sort

Postby dick scherrer » Thu Aug 05, 2010 11:44 pm

Hello,

If the values are to be converted to zd, there will be no spaces, '/'s, or '-'s. . .

There will only be digits. . . Probably with one or more leading zeros in the "output".
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: how to change a PD to ZD including date using sort

Postby Frank Yaeger » Fri Aug 06, 2010 1:40 am

erameshkumarkgm,

Assuming that by "normal numeric data", you mean ZD, I believe these DFSORT statements will do what you asked for:

  OPTION COPY
  INREC BUILD=(1,8,
    9,9,
    18,3,PD,TO=ZD,LENGTH=4,
    21,3,
    24,4,
    27,3,
    30,5,PD,LENGTH=10,
    35,5,PD,LENGTH=10,
    40,2,
    42,3,
    45,5,PD,TO=ZD,LENGTH=10,
    50,5,PD,TO=ZD,LENGTH=10,
    55,2,
    57,1,
    58,143,
    201,50)
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: how to change a PD to ZD including date using sort

Postby erameshkumarkgm » Mon Aug 09, 2010 11:30 am

Thanks Frank it worked fine..
erameshkumarkgm
 
Posts: 9
Joined: Thu Jul 29, 2010 11:38 am
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post