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 move zeros to a comp field using ICETOOL?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to move zeros to a comp field using ICETOOL?
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: 1439
Location: Bangalore,India

PostPosted: Wed Nov 21, 2007 2:14 pm    Post subject:
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    Post subject:
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.
http://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    Post subject:
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: 1439
Location: Bangalore,India

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

Ramanan & Binaya,


Good point.
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 Nov 21, 2007 10:58 pm    Post subject:
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    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 Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts Group elements using ICETOOL Learncoholic DFSORT/ICETOOL 2 Fri Apr 14, 2017 11:01 am
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