Adding Fixed String To A Number Of Datasets

View All Questions

Ask a New Question

  Posted by Marek - Adding Fixed String To A Number Of Datasets :

I have a simple thing to do: add 'abcdefg' to each record in a few FB files each with different record length. In theory it is easy:
OUTFIL BUILD=(C'abcdef',1,length)

However, I do not want to have to provide the length. Since DFSORT knows the recl of the SORTIN, I would expect to not to have to code it explicitly. I don't want to have so many SYSINs where the only difference is the length.

Is that possible?


Guest Says:
You could probably do a couple things like dynamically writing the sysin data, so then you execute the same sort multiple times but each time it executes with a different sort sysin. Thats probably what I would do if I understand the question right.

Marek Says:

Thank you for your response.

I have tried parameterizing it by:
1) passing a parm in the EXEC, like PARM=('JP1"&PRM1"','JP2"&PRM2"') with two SETs:
// SET PRM1='abcdef'
// SET PRM2=42      
OUTFIL BUILD=(JP1,1,JP2),REMOVECC,VTOF (it is not working)
2) with PRM2='1,42' (it doesn't get it)
3) with SYMNAMES:

The third solution works but since the files have each different length it means I will need many symbols and SYSINs anyway so there is no difference to coding them explicitly. So probably there is no other option but just do that.

It's strange I would think it should be easy to code...

Add your reply below ...

See All Questions

Your Name:

Your Reply:

Type the code:

Front Page

Windows System Task Lookup