MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Syncsort count problem

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Anand_R
Intermediate


Joined: 24 Dec 2002
Posts: 189
Topics: 60

PostPosted: Thu Mar 27, 2003 3:27 pm    Post subject: Syncsort count problem Reply with quote

Hi..

I am trying to use PGM=SORT with following.. But I am getting error as 'WER268A OUTFIL STATEMENT : SYNTAX ERROR '

My sysin parameters are as follows :

Code:

  SORT FIELDS=COPY
  OUTFIL NODETAIL,OUTREC=(63:X),
    TRAILER1=('dwc_portfolio_fact_ds_ca,',
       34:COUNT=(M1,LENGTH=6),',',DATE=(MD4/))


could some one tell me the problem..

Thanks
Anand
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Mar 27, 2003 4:59 pm    Post subject: Reply with quote

Anand_r,

Syncsort does not support the editing of the count field. Also REMOVECC is not supported by syncsort. DFSORT supports both of those features. The following JCL will give you the desired results. The job not only removes the carriage control character and also puts the count in the desired format. If you don't want the date in the output dataset, you can use the second method to get the count.

Code:

//STEP0100 EXEC PGM=SYNCTOOL                                   
//TOOLMSG   DD SYSOUT=*                                         
//DFSMSG    DD SYSOUT=*                                         
//IN        DD DSN=YOUR INPUT FILE,
//             DISP=SHR                                               
//T1        DD DSN=&T1,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)     
//OUT       DD DSN=YOUR COUNT DATASET,
//             DISP=(NEW,CATLG,DELETE),
//             UNIT=SYSDA,
//             SPACE=(TRK,(1,1),RLSE)                                       
//TOOLIN    DD   *                                             
  COPY FROM(IN) TO(T1)  USING(CTL1)                             
  COPY FROM(T1) TO(OUT) USING(CTL2)                             
//CTL1CNTL  DD   *                                             
  OUTFIL NODETAIL,OUTREC=(63:X),                                 
  TRAILER1=('DWC_PORTFOLIO_FACT_DS_CA,',34:COUNT,',',DATE=(MD4/))
//CTL2CNTL  DD   *                                             
  INREC FIELDS=(2,33,34,8,FS,ZD,LENGTH=6,42,21,3X)                 
/*               



Method 2:
Code:

//STEP0100 EXEC PGM=SORT                                       
//SYSOUT    DD SYSOUT=*                                         
//SORTIN    DD DSN=YOUR INPUT DATASET,
//             DISP=SHR
//SORTOUT   DD DSN=YOUR COUNT DATASET,
//             DISP=(NEW,CATLG,DELETE),
//             UNIT=SYSDA,
//             SPACE=(TRK,(1,1),RLSE)                   
//SYSIN     DD   *                                             
  INREC FIELDS=(SEQNUM,6,ZD)                            $ SEQNUM
  SORT FIELDS=(1,6,ZD,D)                                $ SORT ON SEQNUM DESC
  OUTFIL FILES=OUT,ENDREC=1,                            $ WRITE ONLY 1 REC
  OUTREC=(C'DWC_PORTFOLIO_FACT_DS_CA,',34:1,6,C',',63:X)
/*                                                             


Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anand_R
Intermediate


Joined: 24 Dec 2002
Posts: 189
Topics: 60

PostPosted: Thu Mar 27, 2003 5:29 pm    Post subject: Reply with quote

kolusu

can u give me either link or explanation of
INREC FIELDS=(2,33,34,8,FS,ZD,LENGTH=6,42,21,3X)

Thanks
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Mar 27, 2003 7:37 pm    Post subject: Reply with quote

Anand,

Quote:
INREC FIELDS=(2,33,34,8,FS,ZD,LENGTH=6,42,21,3X)


When we use any report functions(trailer1, header1...) in sort, it will add 1 byte carriage control in the 1st byte.

So we removing it using inrec fields in the second pass

so

2,33 tells that to copy from 2nd byte from the input for a length of 33 bytes.

34,8,FS,ZD,LENGTH=6 means that count created in the first pass is of 8 Bytes in FLOATING SIGN(FS) format and you are converting to ZD format for a length of 6 bytes.

42,21 means copy from 42nd byte for a length of 21 bytes

3x means pad with 3 spaces

Also I forgot to add RECFM=FB for the output dataset.Please add that to your output dataset definition and it will create the dataset without the carriage control

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anand_R
Intermediate


Joined: 24 Dec 2002
Posts: 189
Topics: 60

PostPosted: Fri Mar 28, 2003 9:24 am    Post subject: Reply with quote

Kolusu,

Thanks a lot ... Infact u deserve more than thanks.. Very Happy
Back to top
View user's profile Send private message
Anand_R
Intermediate


Joined: 24 Dec 2002
Posts: 189
Topics: 60

PostPosted: Tue Apr 01, 2003 4:03 pm    Post subject: Reply with quote

Hi Kolusu,

I need one small help,..

Now I want to drive it thru pds member.. I tried but was ended with return code 12. Can u tell me how to code that toolin part in the pds member..

Here is what I have done..
Code:

//STEP0100 EXEC PGM=SYNCTOOL                                       
//TOOLMSG   DD SYSOUT=*                                             
//DFSMSG    DD SYSOUT=*                                             
//IN        DD DSN=input file,disp=shr
//T1        DD DSN=&T1,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)         
//OUT       DD DSN=output file,
//             DISP=(NEW,CATLG,DELETE),                             
//             UNIT=SYSDA,                                         
//             RECFM=FB,                                           
//             SPACE=(TRK,(1,1),RLSE)                               
//TOOLIN    DD DSN=hlq.pds.member(TESTHDR1),DISP=SHR 
//*                                                   


code in hlq.pds.member(TESTHDR1) as follows
Code:

  COPY FROM(IN) TO(T1)  USING(CTL1)                 
  COPY FROM(T1) TO(OUT) USING(CTL2)                 
//CTL1CNTL  DD   *                                   
  OUTFIL NODETAIL,OUTREC=(74:X),                     
  TRAILER1=('DWC_PORTFOLIO_FACT_DS_CA',             
            50:',',51:COUNT,',',DATE=(MD4/))         
//CTL2CNTL  DD   *                                   
  INREC FIELDS=(2,50,51,8,FS,ZD,LENGTH=8,59,15,3X)   

But my job was abeneded with return code 12.. could u pls help me out in keeping this part in pds member..

Thanks
Anand
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue Apr 01, 2003 4:19 pm    Post subject: Reply with quote

Anand,

You need separate PDS members for TOOLIN, CTL1CNTL and CTL2CNTL. For example:

Code:

//TOOLIN DD DSN=hlq.pds.member(TESTHDR1),DISP=SHR
//CTL1CNTL DD DSN=hlq.pds.member(CTL1),DISP=SHR
//CTL2CNTL DD DSN=hlq.pds.member(CTL2),DISP=SHR


where

member TESTHDR1 has:

Code:

COPY FROM(IN) TO(T1) USING(CTL1)
COPY FROM(T1) TO(OUT) USING(CTL2)


member CTL1 has:

Code:

  OUTFIL NODETAIL,OUTREC=(74:X),
    TRAILER1=('DWC_PORTFOLIO_FACT_DS_CA',
    50:',',51:COUNT,',',DATE=(MD4/))


member CTL2 has:

Code:

  INREC FIELDS=(2,50,51,8,FS,ZD,LENGTH=8,59,15,3X)

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anand_R
Intermediate


Joined: 24 Dec 2002
Posts: 189
Topics: 60

PostPosted: Tue Apr 01, 2003 4:21 pm    Post subject: Reply with quote

thanks a lot frank..
Very Happy
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue Apr 01, 2003 4:56 pm    Post subject: Reply with quote

Glad to do it for a fellow "rodent" (Mickey Mouse and Professor Rat). Very Happy

Frank (pet rats rule!) Yaeger
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anand_R
Intermediate


Joined: 24 Dec 2002
Posts: 189
Topics: 60

PostPosted: Wed Apr 02, 2003 1:28 pm    Post subject: Reply with quote

Kolusu,

Can u provide me the link to the SYNCSORT manuals.. in our shop we use syncsort..

Thanks
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed Apr 02, 2003 1:38 pm    Post subject: Reply with quote

Anand,

Syncsort considers it manuals as properiatory and hence are not available on web. Since your shop has syncsort you can request a copy of the manual.or Just ask your systems programmer if they have any copies with them.

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anand_R
Intermediate


Joined: 24 Dec 2002
Posts: 189
Topics: 60

PostPosted: Wed Apr 02, 2003 1:47 pm    Post subject: Reply with quote

Thanks Kolusu...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group