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

Use of Parm in SORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ambili S

Active User


Joined: 06 Sep 2007
Posts: 112
Location: India

PostPosted: Mon May 09, 2016 9:16 pm
Reply with quote

Hi

I am trying to get 'X' number of records from a file for each execution using ENDREC. I used SET and passed the value using PARM.

SET X=1000
In SORT , PARM='JP1"&X"'.

In Outfil i have ENDREC=JP1 , however, it is getting substituted as ENDREC=C'1000', instead of ENDREC=1000 and failing with syntax error.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2572
Location: NYC,USA

PostPosted: Mon May 09, 2016 10:34 pm
Reply with quote

Because that is a string. You would have to build a sort card which fits to your requirement and if you tell us more then someone can help you better.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7311
Location: Inside the Matrix

PostPosted: Tue May 10, 2016 3:51 am
Reply with quote

The JPn is a sort symbol. A symbol has a syntax. You can't necessarily use it anywhere you want. What release of DFSORT do you have?

If you want to do this "dynamically" with your DFSORT, have a separate step which generates the OUTFIL and use dataset concatenation on SYSIN to build the full sort cards on the second step.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Very Large Sort failed - Seeking reco... DFSORT/ICETOOL 7
No new posts Date conversion using SORT SYNCSORT 4
No new posts Which SORT utility can improve the Pe... DFSORT/ICETOOL 16
No new posts Using sort on VB records based on off... DFSORT/ICETOOL 6
No new posts COBOL VS SORT Utility for file format... COBOL Programming 6
Search our Forums:

Back to Top