Page 1 of 2

Syncsort/DFSORT to omit otherlines ( including HDR and TRL )

PostPosted: Mon Feb 15, 2010 4:01 pm
by Druva
Hi,

I have the following input file with me .

HDRDRUVA
-----------------
------------------
------------------
-------------------
-------------------
TRL000150.

LRECL is VB.

Now I need to write new output file as shown below

Druva
000150

Means, I just need the Name and count.. Please let me know how can I omit the otherlines ( including HDR and TRL ) and get the output as i mentioned above.

WE have DFSORT product in our MF.

Re: DFSORT

PostPosted: Mon Feb 15, 2010 10:20 pm
by skolusu
druva,

Use the following DFSORT JCL

//STEP0100 EXEC PGM=SORT               
//SYSOUT   DD SYSOUT=*                 
//SORTIN   DD DSN=Your input vb file,DISP=SHR
//SORTOUT  DD SYSOUT=*                 
//SYSIN    DD *                         
  SORT FIELDS=COPY                     
  INCLUDE COND=(5,3,SS,EQ,C'HDR,TRL')   
  OUTREC BUILD=(1,4,8,6)               
//*

Re: DFSORT to omit the otherlines ( including HDR and TRL )

PostPosted: Wed Feb 17, 2010 12:36 pm
by Druva
Thanks Kolusu. It's working.

I have one more doubt here, currently we are getting the output file as

Druva
000150

Can we move/add/Push the second line to the First line ?

Like Druva 0000150 ( Druva ( some spaces ) 000150 )


Once again thanking you for your support.

Re: DFSORT to omit the otherlines ( including HDR and TRL )

PostPosted: Wed Feb 17, 2010 10:05 pm
by skolusu
druva,

use the following control cards
//SYSIN    DD *                                             
  SORT FIELDS=COPY                                           
  INCLUDE COND=(5,3,SS,EQ,C'HDR,TRL')                       
  OUTREC IFTHEN=(WHEN=INIT,BUILD=(1,7,10X,8,6)),             
  IFTHEN=(WHEN=GROUP,BEGIN=(5,3,CH,EQ,C'HDR'),PUSH=(8:18,6))
  OUTFIL STARTREC=2,ENDREC=2,BUILD=(1,4,8)                   
//*

Re: DFSORT to omit the otherlines ( including HDR and TRL )

PostPosted: Thu Feb 18, 2010 1:36 pm
by Druva
Thank you skolusu, It's working.

Re: DFSORT to omit the otherlines ( including HDR and TRL )

PostPosted: Thu Feb 18, 2010 3:55 pm
by Druva
Hi skolusu ,

This piece of code is working fine for DFSORT.

May i know how can i get the same output using SYNCSORT ?

I use two different mainframe environment and in which one has DFSORT and other has SYNCSORT.

I think the first SORT solution will run in both DFSORT and SYNSORT.But the second one is for DFSORT.

Please advice me . It would be great if you can give me some contact point to know about this SYNCSORT

Re: DFSORT to omit the otherlines ( including HDR and TRL )

PostPosted: Thu Feb 18, 2010 10:30 pm
by skolusu
Druva,

I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort. I leave the Syncsort answers to the Syncsort people.

Re: DFSORT to omit the otherlines ( including HDR and TRL )

PostPosted: Fri Feb 19, 2010 12:48 am
by dick scherrer
Hello,

Did you try the posted solution on the Syncsort system? What happened?

If there was some problem, what release of Syncsort is being used? If you are not sure, run any sort and the information will be at/near the top of the informational output generated by the run.

I believe the posted solution will work with the current release of Syncsort. . .

Re: DFSORT to omit the otherlines ( including HDR and TRL )

PostPosted: Fri Feb 19, 2010 3:04 pm
by Druva
Hi dick scherrer,

I tried it , but it is giving a Syntax error as shown below.

PRODUCT LICENSED FOR CPU SERIAL NUMBER 72EBE, MODEL 2094 706 LICENSE/PRODUCT EXPIRATION DATE: 03 OCT 2011
SYSIN :
SORT FIELDS=COPY
INCLUDE COND=(5,3,SS,EQ,C'HDR,TRL')
OUTREC IFTHEN=(WHEN=INIT,BUILD=(1,7,10X,8,6)),
*
IFTHEN=(WHEN=GROUP,BEGIN=(5,3,CH,EQ,C'HDR'),PUSH=(8:18,6))
OUTFIL STARTREC=2,ENDREC=2,BUILD=(1,4,8)
WER268A OUTREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
******************************** BOTTOM OF DATA ********************************



Please let me know what is the Syntax error here.

Thanks,
Lahar

Re: DFSORT to omit the otherlines ( including HDR and TRL )

PostPosted: Fri Feb 19, 2010 3:17 pm
by Druva
Hi dick scherrer,


I am using SYNCSORT FOR Z/OS 1.2.3.1R.

Thanks,
druva