Date field update



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Date field update

Postby Naveen@Uppi » Wed Apr 14, 2010 3:10 pm

Hi All,

In my output file, one of the date field has the format YYYYMMDD.

Few records have got the date field filled with 2000 or1993. Few records have data in the right format.
And i want to update the date to YYYYMMDD (any default value)

Please suggest the best way to do this?

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

Re: Date field update

 

Re: Date field update

Postby Alissa Margulies » Wed Apr 14, 2010 8:11 pm

Please show sample records with the correct and incorrect date fields, along with your desired output.
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 1 time

Re: Date field update

Postby Naveen@Uppi » Wed Apr 14, 2010 8:56 pm

In the current file the date format is 1993 (YYYYMMDD, so the date appearing now is SSSS1993). S- spaces.

I want to check the date format and update it to 20100320.

And picture clause of the date is Packed decimal.

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

Re: Date field update

Postby dick scherrer » Wed Apr 14, 2010 11:43 pm

Hello,

Now that you have been a member for almost 2 years, why have you not provided proper information for someone to use to help?

What are the dsorg and lrecl of both files? What are the relevant data positions?

How can a "Packed decimal" field contain spaces? (It can't). . . Suggest you show a few of the input records in hex. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Date field update

Postby Naveen@Uppi » Thu Apr 15, 2010 7:17 pm

Hi,

I was not involved in Mainframes testing for some time now.

The date fied has been declared has PIC S9(09) PACKED-DECIMAL.The length of the field in FAM view is 5.

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

Re: Date field update

Postby Alissa Margulies » Thu Apr 15, 2010 7:50 pm

As we have previously requested, just to be sure we understand how your data is formatted in the record, please provide some sample records including the date fields (with and without blanks) with HEX turned on. Thank you.
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 1 time

Re: Date field update

Postby Naveen@Uppi » Thu Apr 15, 2010 9:53 pm

HI

The In correct date in Hex format:
00093
0019C

I want the date to be updated to:
00660
2003C

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

Re: Date field update

Postby Alissa Margulies » Thu Apr 15, 2010 10:35 pm

Assuming the date field is the first 5 bytes of the record, try this:
//SORT1 EXEC PGM=SORT                           
//SORTIN  DD DSN=INPUT.FILE                     
//SORTOUT DD DSN=OUTPUT.FILE                     
//SYSOUT  DD SYSOUT=*                           
//SYSIN   DD *                                   
   SORT FIELDS=COPY                             
   OUTREC IFTHEN=(WHEN=(1,5,BI,EQ,X'000001993C'),
          OVERLAY=(1:X'020060630C'))             
//***********************************************
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 1 time

Re: Date field update

Postby Naveen@Uppi » Thu Apr 15, 2010 11:57 pm

Thanks you very much, it works
Naveen@Uppi
 
Posts: 36
Joined: Wed Jul 23, 2008 6:49 pm
Has thanked: 0 time
Been thanked: 0 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post