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

How to replace x'00' with x'40 using jcl


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
narasimha.g

New User


Joined: 10 Sep 2009
Posts: 68
Location: Liverpool

PostPosted: Wed Aug 25, 2010 4:48 pm
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Aug 25, 2010 4:59 pm
Reply with quote

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

New User


Joined: 10 Sep 2009
Posts: 68
Location: Liverpool

PostPosted: Wed Aug 25, 2010 5:06 pm
Reply with quote

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

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Wed Aug 25, 2010 6:05 pm
Reply with quote

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

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Wed Aug 25, 2010 6:16 pm
Reply with quote

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
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts replace word 'MONTH' with current mon... SYNCSORT 11
No new posts To replace jobname in a file with ano... SYNCSORT 12
No new posts Conditional replace values in output ... DFSORT/ICETOOL 3
Search our Forums:

Back to Top