Page 1 of 1

SYNCOSRT : Dynamic usage of date in sort card

PostPosted: Sat Jul 06, 2013 10:45 pm
by Nara_513
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

Re: SYNCOSRT : Dynamic usage of date in sort card

PostPosted: Sat Jul 06, 2013 11:28 pm
by Robert Sample
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?

Re: SYNCOSRT : Dynamic usage of date in sort card

PostPosted: Sun Jul 07, 2013 11:58 pm
by Nara_513
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

Re: SYNCOSRT : Dynamic usage of date in sort card

PostPosted: Mon Jul 08, 2013 12:25 am
by prino
SyncSort manuals are copyrighted. If your employer has a licence, they should be able to order them and/or access them on-line.

Re: SYNCOSRT : Dynamic usage of date in sort card

PostPosted: Mon Jul 08, 2013 7:03 am
by dick scherrer
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.

Re: SYNCOSRT : Dynamic usage of date in sort card

PostPosted: Mon Jul 08, 2013 7:13 am
by steve-myers
PGM=ICEMAN
Isn't ICEMAN in DFSORT? Or does SYNCSORT use ICEMAN as an alias for its own similar program?

Re: SYNCOSRT : Dynamic usage of date in sort card

PostPosted: Mon Jul 08, 2013 7:48 am
by dick scherrer
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.