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



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

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

Postby Druva » Mon Feb 15, 2010 4:01 pm

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.
Druva
 
Posts: 6
Joined: Mon Feb 15, 2010 3:51 pm
Has thanked: 0 time
Been thanked: 0 time

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

 

Re: DFSORT

Postby skolusu » Mon Feb 15, 2010 10:20 pm

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)               
//*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

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

Postby Druva » Wed Feb 17, 2010 12:36 pm

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.
Druva
 
Posts: 6
Joined: Mon Feb 15, 2010 3:51 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby skolusu » Wed Feb 17, 2010 10:05 pm

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)                   
//*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

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

Postby Druva » Thu Feb 18, 2010 1:36 pm

Thank you skolusu, It's working.
Druva
 
Posts: 6
Joined: Mon Feb 15, 2010 3:51 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby Druva » Thu Feb 18, 2010 3:55 pm

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
Druva
 
Posts: 6
Joined: Mon Feb 15, 2010 3:51 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby skolusu » Thu Feb 18, 2010 10:30 pm

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.
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

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

Postby dick scherrer » Fri Feb 19, 2010 12:48 am

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. . .
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: DFSORT to omit the otherlines ( including HDR and TRL )

Postby Druva » Fri Feb 19, 2010 3:04 pm

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
Druva
 
Posts: 6
Joined: Mon Feb 15, 2010 3:51 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby Druva » Fri Feb 19, 2010 3:17 pm

Hi dick scherrer,


I am using SYNCSORT FOR Z/OS 1.2.3.1R.

Thanks,
druva
Druva
 
Posts: 6
Joined: Mon Feb 15, 2010 3:51 pm
Has thanked: 0 time
Been thanked: 0 time

Next

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post