IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to find the last record - SYNCSORT


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
r23051984

New User


Joined: 24 May 2009
Posts: 10
Location: chennai

PostPosted: Mon Jun 15, 2009 8:49 am
Reply with quote

we have SYNCSORT FOR Z/OS 1.3.0.2R in our Shop!

I am using the below sort card to remove the headers (alwyas first record is the header ) ,

Code:
//SYSIN   DD *                                         
  SORT FIELDS=(483,9,CH,A,492,4,CH,A,496,11,CH,A),     
  SKIPREC=1,STOPAFT=145961001                         
  OUTREC FIELDS=(1:1,6,PD,EDIT=(TTTTTTTTTTT),12:07,503)
  OUTFIL FNAMES=SORTOUT                               
  SUM FIELDS=NONE,XSUM                                 
//*


STOPAFT=145961001 (last record from the file.)

Now, without knowing the last record count, i.e . i dont know how many records present in the inpuit file. (A new file is created for our process this month)..how to specify this value
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Mon Jun 15, 2009 9:50 pm
Reply with quote

Maybe I am misunderstanding your requirement, but if you want to process all the records except the header record, you do not need the STOPAFT parameter. (Or the OUTFIL statement in this case). Please clarify.

Regards,
Back to top
View user's profile Send private message
r23051984

New User


Joined: 24 May 2009
Posts: 10
Location: chennai

PostPosted: Tue Jun 16, 2009 9:21 am
Reply with quote

You are correct alissa!! Thanks for your clarification..now i realised that there is no need for that STOPAFT. icon_smile.gif
Back to top
View user's profile Send private message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Thu Jun 18, 2009 7:35 pm
Reply with quote

exlcude the header title alone in the sort card. all the records other than that will be processed.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Jun 18, 2009 7:47 pm
Reply with quote

r2k1984 wrote:
exlcude the header title alone in the sort card. all the records other than that will be processed.
Now how does this relate to the OPs problem. icon_rolleyes.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jun 18, 2009 8:12 pm
Reply with quote

not really r2k1984 fault...
the ts put as subject of the topic ... How to find the last record
in the body showed some jcl skipping the first (header ) record,
and went on with that ( as per Alissa reply )

a bit of communication problem around icon_biggrin.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top