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

ICEMAN utility to add a text in a file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kranti

New User


Joined: 10 Oct 2005
Posts: 27

PostPosted: Tue May 02, 2006 4:44 pm
Reply with quote

Hi All,

I need one solution using DFSORT technique using ICEMAN. Actual
requirement is that I have one report file of 133 bytes fixed format.In that
header I want to change to some other text.For example , If the header is having GOOD MORNING, I want to make it as spaces.For that I used
ICEMAN Utility Old syntax model. My system doesn't support the new
type of DFSORT Syntax.I.e, IFTHEN , OVERLAY Like that......

For this I have used the below syntax.

Code:

//SYSIN    DD  *                                                     
  OPTION COPY                                                         
  INREC FIELDS=(1,59,                                                 
    60:14,14,CHANGE=(14,C' GOOD MORNING ',                           
                        C'              '),                           
                    NOMATCH=(60,14),73,60)                           
/*                                                                   


In this total 133 bytes length, the text starts in 60 th position and of having 14 bytes length.My intention is to make these 14 bytes as spaces.
But for me it is not working fine.It is always going into the NOMATCH
condition even if the condition is matching.Could you please anyone suggest me that any thing is going wrong in the syntax or any thing is required to add still.

Kran
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Tue May 02, 2006 8:21 pm
Reply with quote

If I run your control statements with 'bGOOD MORNINGb' (b for blank) in positions 14-27 of the input record, I get blanks in 60-73 of the output record. If you're getting the NOMATCH condition, then you don't have 'bGOOD MORNINGb' in positions 14-27 (note the leading and trailing blank). If your input file is FBA, the data starts in position 2 after the carriage control character, so you have to add 1 to each position (e.g. 15 instead of 14).

You can run this DFSORT job to see what you actually have in positions 14-27:

Code:

//S1 EXEC PGM=SORT                           
//SYSOUT    DD SYSOUT=*                     
//SORTIN    DD DSN=...  input file     
//SORTOUT DD SYSOUT=*                       
//SYSIN    DD  *                             
  OPTION COPY                               
  OUTREC FIELDS=(C'<',14,14,C'>')           
/*


When I ran this with 'bGOOD MORNINGb' starting in 14, SORTOUT had:

Code:

< GOOD MORNING >   


When I ran this with 'bGOOD MORNINGb' starting in 15 (to simulate the FBA case), SORTOUT had:

Code:

<  GOOD MORNING>
Back to top
View user's profile Send private message
kranti

New User


Joined: 10 Oct 2005
Posts: 27

PostPosted: Wed May 03, 2006 7:36 pm
Reply with quote

Hi Frank,

Thanks for Your sugession.....Still I am facing problem as below.

Actual intention is to change the report name to some other name assume spaces.Let us assume the report name as ACTIVITY RECAP.I need to change this report name in all pages of the report.So I used the syntax mentioned in previous mail.

Now I used the syntax to know the actual starting position of the report name and the length.It is as below...

Code:

//SYSIN    DD  *                 
  OPTION COPY                   
  OUTREC FIELDS=(C'<',60,14,C'>')
/*     


It has produced SYSOUT for the heading line as

Code:

<ACTIVITY RECAP>


So the position which I have taken is correct as per my knowledge.
Now I ran the Jcl with below syntax

Code:

//SYSIN    DD  *                               
  OPTION COPY                                 
  INREC FIELDS=(1,59,                         
    60:14,14,CHANGE=(14,C'ACTIVITY RECAP',     
                        C'              '),   
                    NOMATCH=(60,14),74,60)     
/*                                             


But in the output it is not getting replaced by Spaces.Please let me know
if any mistakes exists in above syntax or else show me any other way
of reaching the requirement.

Note: This is of 133 Bytes format and having Cariage control character
in the left most digit for all records.

Please Help me to solve the problem.

Thanks in advance,
Kran.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Wed May 03, 2006 8:34 pm
Reply with quote

You're a little confused. You have

Code:

...,60:14,14,CHANGE=(14,C'ACTIVITY RECAP',     
                        C'              '),...   


This looks at the characters in 14,14. If they're 'ACTIVITY RECAP', it puts blanks in 60,14.

So the input field is 14,14 and the output field is 60,14. It's the 14,14 field that must have 'ACTIVITY RECAP' so that has to be in 14,14. I showed this:

Code:

  OUTREC FIELDS=(C'<',14,14,C'>')   


which displays the characters in 14,14 to see if they're 'ACTIVITY RECAP'.

You used this:

Code:

  OUTREC FIELDS=(C'<',60,14,C'>')


which displays the characters in 60,14 instead of the characters in 14,14.

Are you trying to change 60,14 to blanks if 14,14 has 'ACTIVITY RECAP' (that's what your current CHANGE parameter does) or are you trying to change 60,14 to blanks if 60,14 has 'ACTIVITY RECAP'? If the latter than it would be:

Code:

...,60:60,14,CHANGE=(14,C'ACTIVITY RECAP',C' '),...


Note that you only need one blank, not 14 since the constant will be padded with blanks.
Back to top
View user's profile Send private message
kranti

New User


Joined: 10 Oct 2005
Posts: 27

PostPosted: Wed May 03, 2006 9:37 pm
Reply with quote

Thanks Alot Frank....... Now it is working.........Thanks for ur help..

Cheers,
Kran.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 4
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top