IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Pad spaces at the end of the record with diff LRCLs


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
devmisra

New User


Joined: 29 Jan 2009
Posts: 39
Location: India

PostPosted: Tue Feb 22, 2011 3:40 pm
Reply with quote

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
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Tue Feb 22, 2011 6:31 pm
Reply with quote

Don't go there! Trying this would be soooo much a waste of time!!...

Garry
Back to top
View user's profile Send private message
devmisra

New User


Joined: 29 Jan 2009
Posts: 39
Location: India

PostPosted: Tue Feb 22, 2011 6:44 pm
Reply with 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.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Feb 22, 2011 11:48 pm
Reply with quote

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
View user's profile Send private message
devmisra

New User


Joined: 29 Jan 2009
Posts: 39
Location: India

PostPosted: Wed Feb 23, 2011 10:55 am
Reply with quote

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.
Code:

SORT FIELDS=COPY

- 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. icon_smile.gif

Please let me know If i need to explain more.

Thank you.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Feb 23, 2011 11:51 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Feb 24, 2011 12:26 am
Reply with quote

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
View user's profile Send private message
devmisra

New User


Joined: 29 Jan 2009
Posts: 39
Location: India

PostPosted: Thu Feb 24, 2011 10:58 am
Reply with quote

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
View user's profile Send private message
devmisra

New User


Joined: 29 Jan 2009
Posts: 39
Location: India

PostPosted: Thu Feb 24, 2011 11:10 am
Reply with quote

I meant
"i realised that it would not be a good approach for production move. :-)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
Search our Forums:

Back to Top