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
 

 

ICETOOL for editing a field of a record in the file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
prabe

New User


Joined: 09 Mar 2007
Posts: 17
Location: kerala

PostPosted: Thu Apr 26, 2007 10:07 am    Post subject: ICETOOL for editing a field of a record in the file
Reply with quote

I have a file with header detail and trailer records. I want to filter the number detail records using a condition ( such as details records with a filed value 'a') . Then the output file should have the same header ,filtered details and trailer record and also want to update the count of the detail records in the trailer record.( ie there is filed in trailer corresponding to number of details records wrote into output . I want to update that field also
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: Thu Apr 26, 2007 8:53 pm    Post subject:
Reply with quote

Please show an example of the records in your input file and what you expect for the output records. Give the RECFM and LRECL of the input file.
Give the details of the condition for filtering the records.
Back to top
View user's profile Send private message
prabe

New User


Joined: 09 Mar 2007
Posts: 17
Location: kerala

PostPosted: Mon Apr 30, 2007 3:10 pm    Post subject:
Reply with quote

Code:

Performance report
ram   100
balu  100
siju  200
binu  300
visi  250
srinu  50
prej  100
classXX  7


these are my records what I suppose to do is
I want to filter student details with 100 marks

the output should be

Code:

Performance report
ram   100
balu  100
prej  100
classXX  3


please reply immediately
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Mon Apr 30, 2007 3:18 pm    Post subject: Re: ICETOOL for editing a field of a record in the file
Reply with quote

Quote:
please reply immediately


for what You request proof of payment is required :-)
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Mon Apr 30, 2007 3:57 pm    Post subject:
Reply with quote

prabe,

You should you given the layout also with examples. Anyways, the sort card which you are looking for is below -


Code:
//SYSIN DD *
  SORT FIELDS=COPY
  INCLUDE COND=(7,3,CH,EQ,C'100')   * assumption 100 starts @ col 7
  OUTFIL HEADER1=(C'PERFOMANCE REPORT'),  * Assumed this is a constant
  TRAILER1=(C'CLASSXX ',COUNT)   * Assumed 'xx' value is constant.
/*


Input -

Code:
----+----1----+----2----+---
PERFORMANCE REPORT
RAM   100
BALU  100
SIJU  200
BINU  300
VISI  250
SRINU 050
PREJ  100
CLASSXX 7


Output :

Code:
PERFOMANCE REPORT
RAM   100
BALU  100
PREJ  100
CLASSXX        3
Back to top
View user's profile Send private message
prabe

New User


Joined: 09 Mar 2007
Posts: 17
Location: kerala

PostPosted: Mon Apr 30, 2007 4:12 pm    Post subject: Re: ICETOOL for editing a field of a record in the file
Reply with quote

sorry, the 'Performance report ' is a header record...' it is not a constant ..

my aim is to write header record as same then start count from detail record then update the count in detail record
Back to top
View user's profile Send private message
prabe

New User


Joined: 09 Mar 2007
Posts: 17
Location: kerala

PostPosted: Mon Apr 30, 2007 4:42 pm    Post subject:
Reply with quote

//S1 EXEC PGM=SORT
//SORTIN DD DSN=JATHI.PS,DISP=SHR
//SORTOUT DD DSN=JATHI1.PS,DISP=SHR
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(7,3,CH,EQ,C'100')
OUTFIL HEADER1=(C'PERFOMANCE REPORT'),
TRAILER1=(C'CLASSXX ',COUNT)
//SYSOUT DD SYSOUT=*
//*

JATHI.PS contain all the records.

after execcuting the above jcl I got following errors

RECORD TYPE IS F - DATA STARTS IN POSITION 1
SORTOUT CANNOT BE USED FOR A REPORT - RECFM WITHOUT 'A' SPECIFIED, OR VSAM DATA
END OF DFSORT
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Mon Apr 30, 2007 4:44 pm    Post subject:
Reply with quote

prabe,


Find the required step below -

Code:

//REPRT  EXEC PGM=ICETOOL
//DFSMSG   DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//INNN DD *
PERFORMANCE REPORT
RAM   100
BALU  100
SIJU  200
BINU  300
VISI  250
SRINU 050
PREJ  100
CLASSXX 7
/*
//OUT1 DD DSN=&SYSUID..&SYSUID..TEST,
//       DISP=(MOD,CATLG,CATLG),SPACE=(TRK,2),
//       RECFM=FBA,LRECL=80
//TOOLIN DD *
  COPY FROM(INNN) TO(OUT1) USING(CRD1)
  COPY FROM(INNN) USING(CRD2)
/*
//CRD1CNTL DD *
  SORT FIELDS=COPY,STOPAFT=1
/*
//CRD2CNTL DD *
  OUTFIL FNAMES=OUT1,
                REMOVECC,
                STARTREC=1,
                INCLUDE=(7,3,CH,EQ,C'100'),
               TRAILER1=(C'CLASSXX ',COUNT)
/*
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Mon Apr 30, 2007 4:46 pm    Post subject:
Reply with quote

Prabe,

Quote:
SORTOUT CANNOT BE USED FOR A REPORT - RECFM WITHOUT 'A' SPECIFIED, OR VSAM DATA


If you use DFSORT trailer or header option, your recfm should be FBA/VBA. If you are using FB use REMOVECC in OUTFIL.
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: Mon Apr 30, 2007 8:28 pm    Post subject:
Reply with quote

Prabe,

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=JATHI.PS,DISP=SHR
//SORTOUT DD DSN=JATHI1.PS,DISP=SHR
//SYSIN    DD    *
  OPTION COPY
  INCLUDE COND=(1,11,CH,EQ,C'Performance',OR,
    7,3,FS,EQ,+100)
  OUTFIL REMOVECC,
    TRAILER1=('classXX',COUNT-1=(EDIT=(IIT)))
/*
Back to top
View user's profile Send private message
prabe

New User


Joined: 09 Mar 2007
Posts: 17
Location: kerala

PostPosted: Wed May 02, 2007 2:37 pm    Post subject: Re: ICETOOL for editing a field of a record in the file
Reply with quote

thanks now it is working

thanks a lot
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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