IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Hexadecimal Group compare and write the group in ICETOOL


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
premnath

New User


Joined: 08 Jan 2006
Posts: 15

PostPosted: Fri Nov 20, 2020 10:07 pm
Reply with quote

Hi forum ,
Need some help here in Group comparison .Your help will be much appreciated .Below is the details
Input file1 Type:VB
Input file2 Type:VB
Output file1 type :VB
Output file2 type :VB
All files Length:600
Input file1 Header identifier :X'22003A' in Position 19
Input file1 Trailer identifier: X'220D0A' it could be at any position after any number of records .Whenever
we encounter X'220D0A' that is identified as trailer record for those group of records .
Input file2 Header identifier :X'22003A' in Position 19
Input file2 Trailer identifier: X'220D0A' it could be at any position after any number of records .Whenever
we encounter X'220D0A' that is identified as trailer record for those group of records .
Input file2 Detail record Identifier : X'17' in Position 20
Requirement:Compare certain key fields from Header Record of Input file1 with that of
Any Detail record of File2 (that contains X'17' in Position 20)
and write all matching and unmatching entire group of records from Inputfile1
into o/p file 1 and o/p file 2 respectively
KEY Criteria for Comparison:
IF Pos 1 To Pos 4(Input file1 Header Record) = Pos 1 To Pos 4(Input file2 Detail Record)
AND Pos_22 To Pos_23(Input file1 Header Record) = Pos_22 To Pos_23(Input file2 Detail Record)
AND Pos_22 To Pos_23(Input file1 Header Record) = Pos_29 To Pos_30(Input file2 Detail Record)
THEN
Write only MATCHING group of records from Input file1 In output file 1
ELSE
Write only UNMATCHING group of records from Input file1 In output file 2
END-IF


Input file 1 sample:
Code:
S2A BSTST.COM.ONLY.G1527.G0002V00 Columns 00001 00072
Command ===> Scroll ===> CSR
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
****** ***************************** Top of Data ******************************
000001 1537159 t 0 Ç 6lpl Ì 9 &d 0 0 &d ç 0 ã 0 1 0
FFFFFFF000A00F0301203063F999307303F3583F3F358332003133243F32343F3F3F0000
15371590003010080420A68A6373A08A1A9A04A0A0A04AA047A18A08A0A3A6A0A1A00000
------------------------------------------------------------------------------
000002 1537159 t 0 qËáÈ 4Á àr 4 3 0
FFFFFFF000A00F0100203000000974703F63493F3F3F2244444444444444444444444444
153715900030200C0726A00000583544A45A49A4A3A02C00000000000000000000000000
------------------------------------------------------------------------------
000003 1537159 t 0 /  0 0 0
FFFFFFF000A00F010020333006643F3F3F33003333322444444444444444444444444444
153715900030300B0D29A2A02121A0A0A0AA00AAAAA2C000000000000000000000000000
------------------------------------------------------------------------------
000004 1537159 t 0 6 &d 0 8 0 &d å ç 1
FFFFFFF000A00F0301213F3583000000003F3F3F358343333433333333213003F3333224
15371590003040050122A6A04A00000000A0A8A0A04A738318A000000A92A00A1AAAA2C0
------------------------------------------------------------------------------
------------------------------------------------------------------------------
000005 1537159 t 0 ë ì ß
FFFFFFF000A00F0500213231003000000000000353544444444444444444444444444444
15371590003050030D25A7A204A000000000001A8A900000000000000000000000000000
------------------------------------------------------------------------------
000006 1537159 t 0 A 100
FFFFFFF000A00F010021313C310301033FFF224444444444444444444444444444444444
15371590003060040725A3A1A00A000AA1002C0000000000000000000000000000000000
------------------------------------------------------------------------------
000007 1537159 t 0 0 5e 0 0 0
FFFFFFF000A00F0000213F3F83F3F3F22444444444444444444444444444444444444444
153715900030700F0624A0A55A0A0A02C000000000000000000000000000000000000000
------------------------------------------------------------------------------
000008 1537159 t 0 1 &Ì Ã &d
FFFFFFF000A00F010021303F223573263583122444444444444444444444444444444444
15371590003080050725A2A148A08A26A04A12C000000000000000000000000000000000
------------------------------------------------------------------------------
000009 1537159 t 0 Ã Ç Ì î â
FFFFFFF000A00F0200213630630731330313503133031340200444444444444444444444
15371590003090010825A6A68A08A1720A1760A1800A18202DA000000000000000000000
------------------------------------------------------------------------------
000010 1537159 u 0 Ç 6lpl ` ÑÏ 0 0 ÑÏ ç 0 2   0 ç 0
FFFFFFF000A00F0301203063F99930730313673F3F367332003133243F3F343F343F0000
15371590004010080420A68A6373A09A1A0A97A0A0A97AA047A19A08A0A2A1A0A8A00000


Input file 2 sample:
Code:
S2A BSTST.TEST.ONLY.STRNG17.OUT Columns 00001 00072
Command ===> Scroll ===> CSR
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
****** ***************************** Top of Data ******************************
000001 1537199 Ö 0 Å - 6 0 0 0 0 0 ç 0 0 0 1 É
FFFFFFF000E00F03012030631003313363F3F3F3F3F3F32013103243F3F3F313F3000372
1537199003C010070420A67A0026A57A0A6A0A0A0A0A0A081A84A08A0A0A0A5A1A000612
------------------------------------------------------------------------------
000002 1537199 Ò 0 Å É
FFFFFFF000E00F0000213063003731322444444444444444444444444444444444444444
1537199003D0100F0427A67A0061A552C000000000000000000000000000000000000000
------------------------------------------------------------------------------
000003 1537199 Ò 0 k 2 8 0 0 0 0 0
FFFFFFF000E00F010021393F3F3F3F3F33F3F22444444444444444444444444444444444
1537199003D020050A25A2A2A8A0A0A0AA0A02C000000000000000000000000000000000
------------------------------------------------------------------------------
000004 1537199 Ò 0 m
FFFFFFF000E00F0000213930303022444444444444444444444444444444444444444444
1537199003D0300C0525A4A9A3A42C000000000000000000000000000000000000000000
------------------------------------------------------------------------------
------------------------------------------------------------------------------
000005 1537199 Ò 0 Ø 2 m d 2Á
FFFFFFF000E00F0100213033803F3933803F613122444444444444444444444444444444
1537199003D040080725A2A509A204A045A250A12C000000000000000000000000000000
------------------------------------------------------------------------------
000006 1537199 Ò 0 Ã Å ê è
FFFFFFF000E00F0100213630631331030303105031050200444444444444444444444444
1537199003D0500E0825A6A67A57A8490A0A8420A84402DA000000000000000000000000
------------------------------------------------------------------------------
000007 1537199 Ú 0 Å â - 6 0 0 0 0 1Äd ç 0 0 0 à 0
FFFFFFF000F00F03012030631003314363F3F3F3F3F3F6832013123243F3F3F34313F000
1537199003E010090420A67A0026A52A0A6A0A0A0A0A134A081A81A08A0A0A0A4A0A0000
------------------------------------------------------------------------------
000008 1537199 0 Å ã  
FFFFFFF000F00F0000213063002431422444444444444444444444444444444444444444
1537199003F0100F0427A67A0016A512C000000000000000000000000000000000000000


Output file 1: Similar to Input file 1 But MATCHING all group of records from file 1 from header till trailer
Output file 2:Similar to Input file 1 But UNMATCHING all group of records from file 2 from header till trailer
Back to top
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1140

PostPosted: Sun Nov 22, 2020 8:29 pm
Reply with quote

Number 1: try to do something

Number 2: if your result is wrong, then present here your code, your desired output, and your actual output
Back to top
View user's profile Send private message
premnath

New User


Joined: 08 Jan 2006
Posts: 15

PostPosted: Mon Nov 23, 2020 11:15 pm
Reply with quote

I would like learn this how to do this in ICETOOL .
Tried writing a cobol program and tested it ...it does not write all of the 1527 GROUP of records ..its just writes the 1527 record alone(only one) in every group..which is not as expected ..


Code:
S2A BSTST.R010.STBPROG.VALIDATE.UNMATCH Columns 00001 000
Command ===> Scroll ===> CS
****** ***************************** Top of Data ***************************
000001 1537159 t 0 ë ì ß
FFFFFFF000A00F0500213231003000000000000353544444444444444444444444444
15371590003050030D25A7A204A000000000001A8A900000000000000000000000000
----------------------------------------------------------------------------
000002 1537159 t 0 ë ì ß
FFFFFFF000A00F0500213231003000000000000353544444444444444444444444444
15371590003050030D25A7A204A000000000002A8A900000000000000000000000000
----------------------------------------------------------------------------
000003 1537159 t 0 ë ì ß
FFFFFFF000A00F0500213231003000000000000353544444444444444444444444444
15371590003050030D25A7A204A000000000003A8A900000000000000000000000000
----------------------------------------------------------------------------
000004 1537159 t 0 ë ì ß
FFFFFFF000A00F0500213231003000000000000353544444444444444444444444444
15371590003050030D25A7A204A000000000004A8A900000000000000000000000000
----------------------------------------------------------------------------
000005 1537159 t 0 ë ì ß
FFFFFFF000A00F0500213231003000000000000353544444444444444444444444444
15371590003050030D25A7A204A000000000005A8A900000000000000000000000000


Any one could help on this icetool code that will be really great
Back to top
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1140

PostPosted: Tue Nov 24, 2020 2:11 am
Reply with quote

Before coding in ANY programming language, try to start from the following:

- learn about logical thinking
- learn about algorithms
- learn about data processing methods (not for specific “language”)

Otherwise neither SORT, nor COBOL, nor REXX, nor any other tool would help... 358.gif
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 325
Location: Inside the SPEW (Cincinnati OH USA)

PostPosted: Tue Nov 24, 2020 2:25 am
Reply with quote

Then, as sergeyken ask, what have you tried in ICETOOL? Have you solved any other programming requests using ICETOOL?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Tue Nov 24, 2020 8:13 pm
Reply with quote

If you cannot achieve a solution using COBOL then it is highly unlikely that it can be done by dfsort/icetool. But... you probably have a logic error in your COBOL program so why not fix that?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts regarding COBOL WRITE verb (VB File H... COBOL Programming 6
No new posts INCLUDE COND with WHEN=GROUP SYNCSORT 12
No new posts Write a current record plus previous ... DFSORT/ICETOOL 4
This topic is locked: you cannot edit posts or make replies. REXX to find /* Define and write the ... CLIST & REXX 5
No new posts Compare 2 files replace data in 1st f... DFSORT/ICETOOL 4
Search our Forums:

Back to Top