Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Pad spaces at the end of the record with diff LRCLs

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Pad spaces at the end of the record with diff LRCLs
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

Active Member


Joined: 08 May 2006
Posts: 998
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Feb 22, 2011 6:31 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Tue Feb 22, 2011 11:48 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Wed Feb 23, 2011 11:51 pm    Post subject:
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

Site Director


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

PostPosted: Thu Feb 24, 2011 12:26 am    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us