Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to find the last record - SYNCSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to find the last record - SYNCSORT
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: 500
Location: USA

PostPosted: Mon Jun 15, 2009 9:50 pm    Post subject: Reply to: How to find the last record - SYNCSORT
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    Post subject:
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    Post subject:
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: 2284
Location: @my desk

PostPosted: Thu Jun 18, 2009 7:47 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Thu Jun 18, 2009 8:12 pm    Post subject: Reply to: How to find the last record - SYNCSORT
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us