Hi Sergeyken!
Before post here, I tried in my own test. Believe me.
And I did not get any mention about using variable position or length in Sort manuals regarding SORT, INREC, OUTREC,... statements.
Hi Sergeyken!
Before post here, I tried in my own test. Believe me.
And I did not get any mention about using variable position or length in Sort manuals regarding SORT, INREC, OUTREC,... statements.
That only proves to me again, and again, that you are not able to make any logical conclusion from existing facts. This is very-very typical problem for modern "experts in computer games" who claim themselves as "Senior Software Architecture Experts".
1) If you tried it in your own tests, where are the results of your attempts???
2) Do you have any minor idea, how the variables in your examples are to be handled, and which components are involved?
3) The JCL-variables can only be substituted by one of JES component as part of in-stream text. At this moment, JES has no idea about the meaning of any characters/symbols/operations/whatever else around this and only this JCL-variable name, starting from an ampersand. Any
BUILD=(&pp+1:100,....
has no meaning for JES except the part of &pp detected by its parser. It must be obvious for anyone who had ever learned the basics of computer programming.
So, at this stage only specific value of variable &pp can be substituted as character string in the middle of in-stream data supposed in the future to become an utility control statement.
4) At step execution time, the utility (SORT, or any other) just reads the updated in-stream text with JCL-parameters already replaced by their values earlier by JES. The utility can read this text only as
BUILD=(123+1:100,...
You can easily find out from SORT manual(s) if this syntax is allowed, or not? In theory, a smart enough utility would be able to handle expressions like this; but AFAIK the current versions of SORT utilities do not.
5) Again, when you "tried your own test", what are the results? I expect that everything I explained above (spending my own time for free!) must be obviously concluded from your test results.
Sergeyken,
I just trying to know if that is possible.
I do not know about your time or how expert I am or You are.
Please, do not spend your time.
This is the major problem:
You are not trying to know if that is possible.
You are trying to make others to do your own job, because - despite of your current occupation, and position - you cannot make even elementary logical conclusion from obvious facts.
You even do not try to do it, and probably you never did this in the whole your life.
Once again: where are the results of your attempts to do something?????
SYSIN :
SORT FIELDS=(1,5,A),FORMAT=BI
OUTREC FIELDS=((+5,ADD,+1):(+5,ADD,+1),(+80,SUB,+5))
*
WER813I INSTALLATION OPTIONS IN MFXPRMCT WILL BE USED
WER268A OUTREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
As You can see, in OUTREC statement We have: "p:s,e" (position:start,end)
SYSIN :
SORT FIELDS=(1,5,A),FORMAT=BI
OUTREC FIELDS=((+5,ADD,+1):(+5,ADD,+1),(+80,SUB,+5))
*
WER813I INSTALLATION OPTIONS IN MFXPRMCT WILL BE USED
WER268A OUTREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
As You can see, in OUTREC statement We have: "p:s,e" (position:start,end)
Oh, poor juares castro…
You do not have in your example any "p:s,e" (position:start,end)
What you do have is ((expression):(expression),(expression))
This is an absolutely different entity taken from completely different place of the SORT manual.
This new format (+&KL,ADD,+1) is even more senseless than previously used (&KL+1)
I'm sorry, but I need to recommend you again: start learning the basic principles of computer programming. You can start from re-reading my previous detailed explanation.
So far you do not understand even the simplest syntax diagrams from utility manuals...
Oh, poor Sergeyken!!!
You still do not understand what was my question...
And it is there all time. But you are preoccupied to be impolite.
My point is exactly what I tryed write: intead have fixed values to "position:", "start position" and "length" (p:s,l) I am trying to know if it is possible or not using a variable expression on that specification. Simple: ( )YES ( )NO.
And please, I am not good spending your precious time. To you, end.
You can also try this two step solution,
1. You can use the value 5 in SORT IN and in SORTOUT try BUILD the SORT CARD
2. Use the SORTCARD created in step1.
So whenever you want to change the input value change the SORTIN Data Set and edit to new value.
Oh, poor Sergeyken!!!
You still do not understand what was my question...
And it is there all time. But you are preoccupied to be impolite.
My point is exactly what I tryed write: intead have fixed values to "position:", "start position" and "length" (p:s,l) I am trying to know if it is possible or not using a variable expression on that specification. Simple: ( )YES ( )NO.
And please, I am not good spending your precious time. To you, end.
My point was: the answer to your question is obvious to anyone who has ever opened the JCL+SORT manuals.
I'm 150% sure you never did it. You always ask people around you: "Please, which button do I need to click to perform my job?"