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
 

 

ICEMAN utility to add a text in a file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: ICEMAN utility to add a text in a file
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 Moderator


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

PostPosted: Tue May 02, 2006 8:21 pm    Post subject:
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    Post subject: Re: ICEMAN UTILITY TO ADD A TEXT IN A FILE
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 Moderator


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

PostPosted: Wed May 03, 2006 8:34 pm    Post subject:
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    Post subject: Re: ICEMAN UTILITY TO ADD A TEXT IN A FILE
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm


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