I am trying to get the words in string of line from below input into different variables so that I can search those in next step. I am doing it using PARSE keyword in JCL SORT.
Not getting what I am missing here or any particular syntax would help me in getting this.
My input is (USSTCP is only constant, rest is varying in text and in length as well).
1. First of all, learn how to be polite to your readers:
Piyush Jadhav wrote:
Hi,
I am trying to get the words in string of line from below input into different variables so that I can search those in next step. I am doing it using PARSE keyword in JCL SORT.
Not getting what I am missing here or any particular syntax would help me in getting this.
My input is (USSTCP is only constant, rest is varying in text and in length as well).
4. What does this mean - "get the words in string of line from below input into different variables" ?
Where are there any variables in your example???
Discussions do not help when TS is not interested in learning something, including common terminology...
@Piyush: Not clear: how do you plan to fit your "abcd.xyz.COM" value into 8 characters field you are trying to reserve?
Try this:
Code:
INREC PARSE=(%1=(STARTAT=NONBLANK,
ENDBEFR=C',',ENDBEFR=BLANKS, USE EITHER SEPARATOR
FIXLEN=9, RESERVE 8 + 1 CHARACTER AS FURTHER SEPARATOR
REPEAT=10)), TOTAL 10 FIELDS, ONE TO IGNORE
* BUILD ALIGNED FIELDS, EXCLUDING #1
BUILD=(%2,%3,%4,%5,%6,%7,%8,%9,%10)
SORT FIELDS=COPY
END