SYNCOSRT : Dynamic usage of date in sort card



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

SYNCOSRT : Dynamic usage of date in sort card

Postby Nara_513 » Sat Jul 06, 2013 10:45 pm

Hi All,

I have a requirement where in i have to read a VsAm file and inlcude records based on the date value, here the date format in the VSAM file comp3.

I have created the sort statements using the below JCL and fulfilled my requirement :

//SETP002  EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=XXXXXX.DATE.FILE,DISP=SHR 
//SORTOUT  DD DSN=XXXXXX.SRTCARD2,
//             DISP=(NEW,CATLG,DELETE),
//             UNIT=SYSDA,SPACE=(CYL,(800,200),RLSE),
//             DCB=(*.SORTIN)
//SYSIN    DD *
   SORT FIELDS=COPY
   OUTREC FIELDS=(3:C'INCLUDE COND=(235,05,PD,EQ,',
                  30:1,8,38:X'5D',42X)
/*



But i searched for an alternative using the SYMNAMES concept :

//STEP0100 EXEC PGM=ICEMAN
//SYSOUT   DD SYSOUT=*
//SYMNAMES DD *
PICKDATE,S'&YR4-&LMON-&LDAY'
//SORTIN   DD DSN=Input file,
//            DISP=SHR
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  INCLUDE COND=(235,05,PD,EQ,PICKDATE)
  SORT FIELDS=COPY
/*



But my job got failed as Pick date is getting replaced with charcater '2013-07-06' instead of 2013-07-06(Zonal Decimal) . This will work best when my date in VSAm file is a charcter .

Below is the error code :

SYNCSORT FOR Z/OS  1.4.1.0N   
SYSIN :
  INCLUDE COND=(235,05,PD,EQ,PICKDATE)
  SORT FIELDS=COPY
DATA DICTIONARY SYMBOLS SUBSTITUTED :
INCLUDE COND=(235,05,PD,EQ,C'2013-07-06')
                                               *
SORT FIELDS=COPY
WER253A  INCLUDE/OMIT FORMATS INCOMPATIBLE
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE



Can any one suggest a way to get the date parameter in the Include condition dynamically as Zonal decimal ?

Thanks for your time
Nara
Nara_513
 
Posts: 44
Joined: Fri Dec 02, 2011 1:11 am
Has thanked: 0 time
Been thanked: 0 time

Re: SYNCOSRT : Dynamic usage of date in sort card

Postby Robert Sample » Sat Jul 06, 2013 11:28 pm

But my job got failed as Pick date is getting replaced with charcater '2013-07-06' instead of 2013-07-06(Zonal Decimal)
1. Terminology is important in IT, where similar terms may mean very different things. And the term is "zoned decimal", NOT "zonal decimal".

2. You need to learn and understand data representation on the mainframe. An unsigned zoned decimal value is a character value -- there is no difference in the two.

3. The term you want is packed decimal. "Comp3" (also known as COMP-3) is a term specific to COBOL and only to COBOL.

4. Have you read the manual to determine whether or not what you want to do is even possible? If not -- start reading the manual. If so -- what did the manual tell you?
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: SYNCOSRT : Dynamic usage of date in sort card

Postby Nara_513 » Sun Jul 07, 2013 11:58 pm

Hi Robert,

I agree with you, that was a typo from my end , and i should have double checked before i posted.

I didnt went through the manual, could you please share me the manual .

Thanks Nara
Nara_513
 
Posts: 44
Joined: Fri Dec 02, 2011 1:11 am
Has thanked: 0 time
Been thanked: 0 time

Re: SYNCOSRT : Dynamic usage of date in sort card

Postby prino » Mon Jul 08, 2013 12:25 am

SyncSort manuals are copyrighted. If your employer has a licence, they should be able to order them and/or access them on-line.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times

Re: SYNCOSRT : Dynamic usage of date in sort card

Postby dick scherrer » Mon Jul 08, 2013 7:03 am

Hello,

Another problem with the sort control posted is that "things in quotes" may not be compared to a packed-decimal value.

If your organization is licensed to use Syncsort, all of the material may be gotten from Syncsort Support for free.
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: SYNCOSRT : Dynamic usage of date in sort card

Postby steve-myers » Mon Jul 08, 2013 7:13 am

PGM=ICEMAN
Isn't ICEMAN in DFSORT? Or does SYNCSORT use ICEMAN as an alias for its own similar program?
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: SYNCOSRT : Dynamic usage of date in sort card

Postby dick scherrer » Mon Jul 08, 2013 7:48 am

Hello,

Yup, lots of aliases running about.

Syncsort can be aliased as just about anything.

To make things easier for people who move between products, most systems alias the Syncsort executables to their corresponding DFSORT names.
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


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post