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
 
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: 8279
Location: Dubuque, Iowa, USA

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: 1541
Location: Chennai

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: 1541
Location: Chennai

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 Find & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am
No new posts Replace last name by first name anatol DFSORT/ICETOOL 10 Thu Mar 15, 2018 3:43 pm
No new posts help to replace columns by rows Vikas Maharnawar DFSORT/ICETOOL 8 Tue Mar 06, 2018 3:27 pm
No new posts How to replace the below query? pkmurali DB2 12 Tue Feb 27, 2018 9:51 pm
No new posts Do we have any Modern tools to replac... NajeebKR Compuware & Other Tools 4 Sat Jan 27, 2018 1:22 pm

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