MAINFRAME - TIP OF THE DAY :
Q. If there is a situation, where we need to code more than 255 steps in a JOB?
A. We need to split jcl into two jcls , at the end of the first jcl check the condition code and initiate the second jcl.
Programmers Voted for below topics. Please Vote for good Posts.
Thank You! for your feedback. Connecting to the server. Please Wait...
Posted: Thu May 12, 2011 8:20 pm Post subject: Splitting of File using Icetool
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.
* 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
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.
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
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