Page 1 of 1

Replacing a string in a dataset name

PostPosted: Mon Feb 13, 2012 8:28 pm
by vinodj
Hello,

I have a dataset name like this :

DSN = U60667.<002.XX>.DATA.

I want to replace <002.XX> with Q1 defined like :
01 Q1 PIC X(110).

Q1 can be of varying length. For this I wrote following code :

INSPECT DSN REPLACING ALL '<002.XX>' BY Q1.

But the compiler gave an error that Q1 is of higher length than '<002.XX>' . Could you suggest me something to overcome this.

Regards,
Vinod.

Re: Replacing a string in a dataset name

PostPosted: Mon Feb 13, 2012 9:39 pm
by Akatsukami
Given that a node in a data set name cannot be more than eight characters in length, why did you define Q1 to be PIC X(110)?