View previous topic :: View next topic
|
Author |
Message |
Ambili S
Active User
Joined: 06 Sep 2007 Posts: 112 Location: India
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|