View previous topic :: View next topic
|
Author |
Message |
narasimha.g
New User
Joined: 10 Sep 2009 Posts: 68 Location: Liverpool
|
|
|
|
Hi,
My requirement is to merge three files of different lengths.... So I am setting the length of all to files to the file with highest length...
My files are of length 450, 550 and 630.... im making all the datasets equal to 630...
Now the prob is the extra length is filled with spaces with hex code X'00'
But when this is ftp'ed onto PC instead of space i am getting junk characters.... can u pls suggest me how i can modify the jcl so that all X'00' is replaced with X'40' |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
Now the prob is the extra length is filled with spaces with hex code X'00' |
This makes no sense at all -- spaces are X'40', low values are X'00'.
And since you did not bother to tell us if you wrote a program to do this, or used a utility such as IEBGENER or SORT, what do you expect us to do to help you?
Finally -- you desperately need to contact your site support group. FTP has an option to suppress trailing spaces on file transfers, so if this option is set at your site then the spaces you are so laboriously adding would be wiped out by the file transfer. And since this option is site-specific, only your site support group can tell you how it is set for your site. |
|
Back to top |
|
|
narasimha.g
New User
Joined: 10 Sep 2009 Posts: 68 Location: Liverpool
|
|
|
|
Robert Sample wrote: |
Quote: |
Now the prob is the extra length is filled with spaces with hex code X'00' |
This makes no sense at all -- spaces are X'40', low values are X'00'.
And since you did not bother to tell us if you wrote a program to do this, or used a utility such as IEBGENER or SORT, what do you expect us to do to help you?
|
I used Sort to do that operation...
is there any means to replace low values with spaces? |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hi,
Quote: |
FTP has an option to suppress trailing spaces on file transfers |
To check if trailing blanks are set to be removed or kept, Log into FTP from command shell and issue a STAT command. It would give you this info.
Code: |
211-Trailing blanks are not removed from a fixed format |
Hope this helps. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hi,
Code: |
//JS010 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DISP=SHR,DSN=*.TEST.FILE1
//IN2 DD DSN=*.TEST.FILE2,DISP=OLD
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//TOOLIN DD *
COPY FROM(IN1) TO(IN2) USING(CTL1)
/*
//CTL1CNTL DD *
INREC OVERLAY=(9:72X)
/* |
The *.TEST.FILE1 is a file which has a reclen of 8.
*.TEST.FILE2 has a reclen of 80.
the above JCL copies file1 to file2 by padding spaces at end, which is X'40' |
|
Back to top |
|
|
|