Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : Use TSO HOMETEST to find the Mainfram IP. This IP Address can be used with FTP GET , to unload files from mainframe.

Google
 
Web mainframegurukul.com

Programmers Voted for below topics.      Please Vote for good Posts. Votes Salutes
Topic Title Votes Salutes
SOC 7 abend - interview question 6
splitting of records using cobol 6
HOW TO FIND LINKAGE LENGTH 5
jcl sort to add leading zeroes 5
EJECT Verb in COBOL 4
Changes in copybook 4
Infosys Training Program for freshers 4
Comparing two files 3
What are the issues related with correlated subqueries? 3
VSAM File status 23 ,but records are present in the file 3
what is index or subscript in cobol. please give me brief ex 3
IKJ56500I COMMAND DSN NOT FOUND 3
Cobol Multiple Choice Questions By Shravan Wipro 1 1
Hexadecimal to decimal conversion - SORT JCL INREC OUTREC 1 1
What is the difference between SYNONYM and ALIAS? 1 1
sort two files with same sort condition 1 1
Merging two files into one based on certain key fields: 1 1
Copy GDG to GDG (one to one). 1 1
jcl sort to add leading zeroes 5
VSAM File status 23 ,but records are present in the file 3
How we can access PDS and its Members thru COBOL ? 3
stored procedure in cobol 2
what s the difference between DB2 & ADB2? 2
Hexadecimal to decimal conversion - SORT JCL INREC OUTREC 2
What is auditing? 2
Reg DFSORT utility. 2
Computer based tutorial on IMS DB/DC 2
what is index or subscript in cobol. please give me brief ex 2
How to compare two ps files having millions of records ? 2
SOC 7 abend - interview question 1
What is the difference between Static and Dynamic Binding? 1
How to read HEX file and convert it into decimal in REXX. 1
EZtrv+ - Is there a way to suppress ez-code from printing... 1
sort two files with same sort condition 1
U4093 IMS Abend 1
Is it possible to get last modified date of PDS members... 1
Merging two files into one based on certain key fields: 1
Corresponding statement 1
Comparing Date with current date 1
Man of the year 1
I need to FTP from MF to UNIX 1
Splitting of File using Icetool

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DFSORT , ICETOOL & Utilities
  View previous topic :: View next topic  
Author Message
Assassin
Member


Joined: 12 May 2011
Posts: 2

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu May 12, 2011 8:20 pm    Post subject: Splitting of File using Icetool Reply with quote

We have 1 file with header and trailer records. We have to Split this file such that:
a) Both files will have same header as obtained from input file
b) Both files will have same trailer as obtained from input file except the count of records present in newly created files.
c) Data records will be splitted based on 3 characters represented as XXX in sample data given below(records having XXX = 008
needs to be in one file and rest in other file).

I am able to copy header,trailer and split data records but not able to update the count of records in trailer . Moreover I don't think I created an optimised Icetool.

File properties are FB,LRECL=40

Sample Data in file is :

14X'00'ABCDEFGHIJK20110207 (Header)
12345678912345XXXO
68663647346764XXXO
93619719469696XXXO
69696696696996XXXO
.
.
.
12340010585858XXXO
14X'FF'ABCDEFGHIJK0000047723 (Trailer)


* Here initial 14 characters in Header are Low values X'00'
* initial 14 characters in trailer are High values X'FF'
* XXX(alphanumeric) are the 3 characters based on which split will occur starting from 15th position.
* Last 10 digits in trailer represent count starting from 26th position.

Please can somebody help me out by providing solution to my problem. Thanks
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.

dbzTHEdinosauer
Moderator


Joined: 02 Oct 2006
Posts: 952

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu May 12, 2011 8:38 pm    Post subject: Reply with quote

why don't you start by:
  • showing us your control cards
  • provide a more realistic input file
  • provide a precise expected output
  • tell us what is/how is the 'split' indicator determined? - we know where the comparision is to take place, just don't know with what.


you may know what you need, but you have not really explained it to us.
_________________
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Assassin
Member


Joined: 12 May 2011
Posts: 2

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu May 12, 2011 9:39 pm    Post subject: Reply with quote

provide a more realistic input file:
This is the realistic file as mentioned in my original post containing:
a) Header: first 14 characs as Low value then next 11 characs are system name and at the end 10 numeric digits containing business date
b) Trailer: first 14 characs as Low value then next 11 characs are system name and at the end 10 numeric digits showing count of main data records in file.
c) Data records: First 14 numeric digits containing account branch info then next 3 characs(doc type) based on which files will be splitted into 2 output files then at the end 1 charac representing a constant


provide a precise expected output

Two files with exactly same format as of input file,
a) same header values in both files, as in input file
b) Same trailer values in both files except the count of main data records obtained in respective file after splitting.
c) Data records in one file for doc type = 008 and in other all other records

tell us what is/how is the 'split' indicator determined? - we know where the comparision is to take place, just don't know with what

May be I have confused you by my earlier post, by split I meant just that one output file will have data records based on doc type =008(alphanumeric data) and other file with data records with other doc type. So we can simply copy records in respective output files by using Include or Omit condition.
I used 15,3,CH,EQ,'008'. (its working)

Hope I have clarified your queries a bit to enable you finding solution to my problem
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Frank Yaeger
Moderator


Joined: 18 Feb 2006
Posts: 812
Location: San Jose, CA

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri May 13, 2011 9:12 pm    Post subject: Reply with quote

Here's a DFSORT job that will do what you asked for using DFSORT's new IFTRAIL function available with the Oct, 2010 PTF. I assumed X'FF's in positions1-5 were enough to identify the trailer.

Code:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file
//OUT1 DD DSN=...    output file1
//OUT2 DD DSN=...    output file2
//SYSIN DD *
  OPTION COPY
  OUTFIL FNAMES=OUT1,
    INCLUDE=(15,3,CH,EQ,C'008'),
    IFTRAIL=(HD=YES,TRLID=(1,5,BI,EQ,X'FFFFFFFFFF'),
      TRLUPD=(26:COUNT=(M11,LENGTH=10)))
  OUTFIL FNAMES=OUT2,
    INCLUDE=(15,3,CH,NE,C'008'),
    IFTRAIL=(HD=YES,TRLID=(1,5,BI,EQ,X'FFFFFFFFFF'),
      TRLUPD=(26:COUNT=(M11,LENGTH=10)))
/*


For more information on the Oct, 2010 DFSORT PTF,see:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000242
_________________
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DFSORT , ICETOOL & Utilities All times are GMT + 5 Hours
Page 1 of 1



 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts Need to put records a Sorting order as mentioned below. 13 Yash1911 4488 Wed Oct 31, 2012 8:18 pm
dbzTHEdinosauer View latest post
No new posts how to deal with the below scenario using iebgener 7 mainframes_6002 4568 Wed Dec 07, 2011 10:34 am
DikDude View latest post
No new posts Coulu someone explain the parameters in the below code? 1 lovely sweety 6295 Thu Jun 09, 2011 3:50 pm
dbzTHEdinosauer View latest post
No new posts Unable to achieve below scenario using ICETOOL 24 sirianangel 20657 Sat Oct 23, 2010 12:45 am
Frank Yaeger View latest post
No new posts Query For IEBPTPCH 2 padmajeet.gaikwad 8643 Mon Oct 26, 2009 10:25 am
padmajeet.gaikwad View latest post
 





Cobol Tutorial
This cobol tutorial covers most of the important topics like STRING, UNSTRING, COMP, COMP-3.....
DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. Explains in simple language. Some Chapters are locked, Forum members have free access to these chapters
CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming...
JCL Tutorial
This is most popular JCL tutorial from mainframegurukul. It does contain important jcl ....
SORT Tutorial
This Tutorial covers all important aspects of DFSORT. Has more SORT examples
INTERVIEW Questions
This page covers important interview questions
Mainframe Jobs
Mainframe Jobs posted by members of mainframegurukul forum
FaceBook Page
MainframeGurukul FaceBook Page
LinkedIn Page
MainframeGurkul Linkedin Page

This widget requires Flash Player 9 or better







Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials || Mainframe CICS tutorial|| Mainframe COBOL Tutorial

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB

mainframetopic-5796.html