Page 1 of 1

how to use OUTREL to get the output ?

PostPosted: Sun May 10, 2015 10:34 pm
by pal_ll
input:
001 123456
001 111111
001 222222
001 333333

output:
0001 12 456
0001 11 111
0001 22 222
0001 33 333

HI ALL, how to use OUTREL to get the output like above scenario ?
in the first byte + "0", and in the 7th byte = space

Re: how to use OUTREL to get the output ?

PostPosted: Mon May 11, 2015 4:12 am
by NicC
What version of JCL are you using? I just checked the JCL Language Reference manual - link above - and OUTREL is not found.

Re: how to use OUTREL to get the output ?

PostPosted: Mon May 11, 2015 7:29 am
by steve-myers
As NicC said, this is not properly a JCL question. JCL, by itself, cannnot manipulate data in any way.

More likely, it is a sort issue; I believe both DFSORT and Syncsort have an OUTREL control of some sort. Another possibility is to use IBM data set utilities. I think both the IEBGENER or IEBPTPCH utilities can be persuaded to edit your data in the way you want, though neither utility has an OUTREL control by that name.

Re: how to use OUTREL to get the output ?

PostPosted: Mon May 11, 2015 11:39 am
by BillyBoyo
If it is SORT, there are INREC, OUTREC and OUTFIL which can do that.

  INREC BUILD=(C'0',1,6,X,8,3)


The C'...' notation is for character constants (there are other types you can look up). The X is a blank, 3X would be three blanks. There is others of those as well (see if you can find what Z does. 1,6 takes the first six from the input, and places them in the next available six from the output. 8.3 is similar.