View previous topic :: View next topic
|
Author |
Message |
devmisra
New User
Joined: 29 Jan 2009 Posts: 39 Location: India
|
|
|
|
Hi All,
Input File is FB and LRECL=80. to copy data I used sort card
Code: |
SORT FIELDS=COPY
OUTREC OVERLAY=(133:X)
|
Output file gets padded with SPACES after col 80
Please suggest a generic sort card so that I can use for different output LRECL datasets.
e.g
Output file could be FB with different LRECL 80/100/110.. and VB with LRECL 133/159/2004 .. Means, Output file type is different as per the requirement. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Don't go there! Trying this would be soooo much a waste of time!!...
Garry |
|
Back to top |
|
|
devmisra
New User
Joined: 29 Jan 2009 Posts: 39 Location: India
|
|
|
|
Can you please suggest me any way to COPY data from FB-80 to VB/FB- any LRECL with spaces padded at the end of the records. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
Can you please suggest me any way to COPY data from FB-80 to VB/FB- any LRECL with spaces padded at the end of the records. |
This is too vague to answer. You need to do a better job of explaining what it is you're trying to accomplish. |
|
Back to top |
|
|
devmisra
New User
Joined: 29 Jan 2009 Posts: 39 Location: India
|
|
|
|
well, I have 3 files and all the 3 files are of same length (i.e FB,LRECL=80)
when i copy data from FB(80) to VB(133), spaces are to be padded at the end of the records.
I need to merge these 3 files into another(output) file which may be a FB or VB with length may be of 80(FB) or 133(VB) or 201(VB) or any
Using SORT
- When I copy FB(80) to FB(80) it is all fine.
- When I copy from FB(80) to VB(133) and to pad spaces at end of the records,I used
Code: |
SORT FIELDS=COPY
OUTREC OVERLAY=(133:X)
|
To pad spaces, here for 133(VB) I used (133:X), and for 201(VB) I have to use (201:X). Well, Is there any way by using one sort card we can pad spaces for both the cases like 133(VB), 201(VB)..
NB: I will use the above SORT card to send different LRECL datasets to respective email ids using SMTP.
Please let me know If i need to explain more.
Thank you. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
Is there any way by using one sort card we can pad spaces for both the cases like 133(VB), 201(VB).. |
You have to specify the ending position. You could use the same OUTREC statement with a symbol for the column, but you'd still have to change the symbol each time:
For example, if the LRECL is 133, you would use:
Code: |
...
//SYMNAMES DD *
ENDCOL,133
//SYSIN DD *
SORT FIELDS=COPY
OUTREC OVERLAY=(ENDCOL:X)
...
|
If the LRECL is 201, you would use:
Code: |
...
//SYMNAMES DD *
ENDCOL,201
//SYSIN DD *
SORT FIELDS=COPY
OUTREC OVERLAY=(ENDCOL:X)
...
|
So only the ENDCOL statement would change. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If the file is variable, why waste the space padding the record with blanks?
Places i've supported would not permit this to be promoted to Production. . . |
|
Back to top |
|
|
devmisra
New User
Joined: 29 Jan 2009 Posts: 39 Location: India
|
|
|
|
Thank you Frank. This solution worked fine and a new thing I came to know.
And also I agree with Dick, after posting this topic, i realised that it would not be a good solution for production move.
Thank you so much. |
|
Back to top |
|
|
devmisra
New User
Joined: 29 Jan 2009 Posts: 39 Location: India
|
|
|
|
I meant
"i realised that it would not be a good approach for production move. :-) |
|
Back to top |
|
|
|