Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 2352
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: 10457
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 VSAM - Accessing beyond record size Benchwarmer JCL & VSAM 6 Wed Apr 11, 2018 9:20 pm
No new posts Reformatting and adding additional fi... Badbeef SYNCSORT 6 Thu Apr 05, 2018 4:45 pm
No new posts Find & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am
No new posts Find a string in PS file opened in br... mukkas CLIST & REXX 3 Sat Feb 24, 2018 2:15 pm
No new posts Copying only first and last word from... chandan.inst SYNCSORT 4 Wed Jan 31, 2018 4:19 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us