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

How to move zeros to a comp field using ICETOOL?


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

New User


Joined: 21 Mar 2007
Posts: 66
Location: Chennai, Tamilnadu, India

PostPosted: Wed Nov 21, 2007 1:41 pm
Reply with quote

Hi All icon_biggrin.gif ,

I have an input file of LRECL 1700. It has a COMP value at column 1386.
The requirement is to initialize it with zeros. Its in S9(8) COBOL data type.

Can we achieve this using ICETOOL?

Thanks in advance.

Regards,
Ramanan R
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Nov 21, 2007 2:14 pm
Reply with quote

Ramanan,

Quote:
Can we achieve this using ICETOOL?

Sure.

Code:
OUTREC FIELDS=(1386:8Z)

The above code moves 8 binary zeroes at 1386 col. Please change according to your requirement.
Back to top
View user's profile Send private message
Ramanan-R

New User


Joined: 21 Mar 2007
Posts: 66
Location: Chennai, Tamilnadu, India

PostPosted: Wed Nov 21, 2007 3:41 pm
Reply with quote

Murali,

Thanks for the reply.

I think the code should be
Code:

OUTREC FIELDS=(1386:4Z)

4Z instead of 8Z as DFSORT length for S9(8) COMP is 4. Please refer to the below link given by Frank in his previous post.
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/C.3?DT=20060615185603

Correct me, if i'm wrong.

Thanks & Regards,
Ramanan R
Back to top
View user's profile Send private message
Binaya

New User


Joined: 03 Jul 2007
Posts: 77
Location: Hyderabad

PostPosted: Wed Nov 21, 2007 3:57 pm
Reply with quote

You are correct Ramanan..

But as you mentioned " Its in S9(8) COBOL data type. "
Murali has Ignored that "It has a COMP"
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Nov 21, 2007 4:06 pm
Reply with quote

Ramanan & Binaya,


Good point.
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 Nov 21, 2007 10:58 pm
Reply with quote

Code:

    OUTREC FIELDS=(1386:4Z)


This is the correct initialization value but the use of FIELDS will result in only having that one field in the output record. The rest of the input record will be lost. Here's a DFSORT job to init. just that field without changing the rest of the record:

Code:

//S1 EXEC  PGM=ICEMAN                     
//SYSOUT    DD  SYSOUT=*                     
//SORTIN DD DSN=...  input file (FB/1700)         
//SORTOUT DD DSN=...  output file (FB/1700) 
//SYSIN    DD    *                           
    OPTION COPY
    INREC OVERLAY=(1386:4Z)
/*


Quote:
Can we achieve this using ICETOOL?


If you want to use DFSORT's ICETOOL, you could use this job:

Code:

//S2    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN DD DSN=...  input file (FB/1700)
//OUT DD DSN=...  output file (FB/1700)
//TOOLIN DD *
COPY FROM(IN) TO(OUT) USING(CTL1)
/*
//CTL1CNTL DD *
  INREC OVERLAY=(1386:4Z)
/*
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 Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
Search our Forums:

Back to Top