|
View previous topic :: View next topic
|
| Author |
Message |
sid_aec
New User
Joined: 01 Jul 2008 Posts: 60 Location: Kolkata
|
|
|
|
Hi,
I have data looks as below:Lrecl=80
H04062010AAA
DAABBCCDDEEFFGGHH
T123123123
I want the data as below.
"1st O/P file:"
H,04062010,AAA
D,AA,BB,CC,DD,EE,FF,GG,HH
T,123,123,123
"2nd O/P file"
AADDHH
I am allowed to increase O/P file length due to commas for first case and for second 80 fixed.Could you please advise which way I can achieve this. I don't want the way to separate these 3 types of records into 3 different temp files and do outrec,then merge those three again.
Can you suggest optimized one step for this using icetool.
Thanks.. |
|
| Back to top |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
and the rules are ?
Gerry |
|
| Back to top |
|
 |
Escapa
Senior Member

Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
You also need to tell SORT product installed at your site.
Your previous posts are present both in JCL and DFSORT parts of forum...
and as Gerry as asked
How you arrived at output of second file?
for first output file is the field lengths is is criteria to make it comma separated? If so mention it in detail for each field from header\detail line and trailer. |
|
| Back to top |
|
 |
sid_aec
New User
Joined: 01 Jul 2008 Posts: 60 Location: Kolkata
|
|
|
|
Hi,
Actually I can use ICETOOL in our system.And Yes, all the data I have shown, you can consider similar calculation for bytes.
For 1st, its just fields of different length for 3 different type of records and need those as "," separated as shown.
For 2 nd its just outrec for (2,2,8,2,16,2) for trailer record i.e. (1,1,EQ,C'T')
But I want to create one step for both..Actually I am in design phase.You please consider no of bytes exactly as shown in example.
My problem is as H,D,T have different fields and they need to comma separated as shown in example, I am not getting how to do that in one step.
Please share your thought on this.
Thanks,
Sid. |
|
| Back to top |
|
 |
sid_aec
New User
Joined: 01 Jul 2008 Posts: 60 Location: Kolkata
|
|
|
|
Sorry!!Please consider the below line for 2 nd O/P file..I apologize.
For 2 nd its just outrec for (2,2,8,2,16,2) for Detail record i.e. (1,1,EQ,C'D') |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8798 Location: Welsh Wales
|
|
|
|
Although you say that you can use ICETOOL for this, ICETOOL may possibly be an alias for the SYNCSORT equivilent, so it would be greatly appreciated if you could perform the step below and clarify exactly which product and release level is being used by running the simple sort step shown below.
If the messages start with ICE then your product is DFSORT and will be moved to the correct forum by one of the moderators. Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered.
If the messages start with WER or SYT then the product is SYNCSORT and the topic will remain in the JCL forum. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.
Thank you for taking your time to ensure that the valuable time of others is not wasted by offering inappropriate solutions which are not relevant due to the sort product being used and/or the release that is installed in your site.
| Code: |
//SORTSTEP EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
ABC
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY |
Gerry has asked what the rules are, and so far you have not answered him. From what I can see the rules are as clear as mud if they exist at all. Does the subsequent formatting of the records depend on the first character of the record, if so, please explain the rules clearly. If not, then describe in detail how the record needs to be reformatted.
Unless YOU tell us the exact rules we can only guess at what you want to do, and quite frankly I would rather do something else where I know the rules rather than waste my time by guessing at things that you have not told us. |
|
| Back to top |
|
 |
Escapa
Senior Member

Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Based on available information most I could do is this... .
| Code: |
//STEP030 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
H04062010AAA
DAABBCCDDEEFFGGHH
T123123123
//SORTOUT DD SYSOUT=*
//SORT2 DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(1,1,CH,EQ,C'H'),
BUILD=(1,1,C',',2,8,C',',10,3,80:X)),
IFTHEN=(WHEN=(1,1,CH,EQ,C'D'),
BUILD=(1,1,C',',2,2,C',',4,2,C',',6,2,C',',
8,2,C',',10,2,C',',12,2,C',',14,2,C',',16,2,80:X)),
IFTHEN=(WHEN=NONE,
BUILD=(1,1,C',',2,3,C',',5,3,C',',8,3,80:X))
OUTFIL FNAMES=SORT2,REMOVECC,INCLUDE=(1,1,CH,EQ,C'D'),
BUILD=(3,2,12,2,24,2,80:X)
/* |
SORTOUT will have (output1)
| Code: |
H,04062010,AAA
D,AA,BB,CC,DD,EE,FF,GG,HH
T,123,123,123
|
SORT2 will have...
|
|
| Back to top |
|
 |
sid_aec
New User
Joined: 01 Jul 2008 Posts: 60 Location: Kolkata
|
|
|
|
| Thanks Guys..The product at my end is DFSORT. I don't know how to move discussion to another section.Please move this one to DFSORT/ICETOOL section.Thanks again.. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|