Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to replace x'00' with x'40 using jcl
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: 7936
Location: Bellevue, IA

PostPosted: Wed Aug 25, 2010 4:59 pm    Post subject:
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    Post subject:
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: 1459
Location: Azeroth

PostPosted: Wed Aug 25, 2010 6:05 pm    Post subject:
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: 1459
Location: Azeroth

PostPosted: Wed Aug 25, 2010 6:16 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Sort card to replace text using cross... Susanta SYNCSORT 32 Tue Sep 13, 2016 4:17 pm
No new posts Replace function abdulrafi COBOL Programming 13 Mon Sep 12, 2016 10:12 am
No new posts Need a help how to replace a string i... gurunath82 CLIST & REXX 12 Tue Jul 26, 2016 11:43 pm
No new posts DFSORT - FIND AND REPLACE Other Field... Arunraj Murugaiyan DFSORT/ICETOOL 6 Fri Feb 12, 2016 1:52 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us