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

icetool empty file and not empty file processing


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

New User


Joined: 01 Jun 2021
Posts: 2
Location: Singapore

PostPosted: Tue Jun 01, 2021 2:09 am
Reply with quote

Hello, can you so kindly help out a sister?
---
This is my input file:
---
Code:
HDRmmddyy    ---> header record
DTLrec01         ---> actual detail record #1
DTLrec02         ---> actual detail record #2
DTLrec03         ---> actual detail record #3
DTLrec04         ---> actual detail record #4
TRL000004         ---> trailer record

---
How do I write the actual JCL ICETOOL command for this:
---
Code:
STEP01     EXEC PGM=ICETOOL
//TOOLMSG  DD SYSOUT=*
//DFSMSG    DD SYSOUT=*
//DD01     DD DSN=TEST.INPUT.DATA,DISP=SHR
//DD02     DD DSN=TEST.OUTPUT.DATA,DISP=OLD
//TOOLIN     DD *
   COUNT FROM(DD01)
   Write in sysout message: #REC. = 000004  -----> result of icetool count
   Write in DD02 '000004'   ---->  from the trailer record
   IF RC=4 or EMPTY
      write in DD02 'File is Empty'
   ELSE   
   IF RC=0 or NOT-EMPTY
      write in DD02 '# recs. in file: ' 000004  ----> result of icetool count
//*

Coded for you
Back to top
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1084

PostPosted: Tue Jun 01, 2021 11:23 am
Reply with quote

CODE TAGS!!!
Back to top
View user's profile Send private message
Nenoch Laxa

New User


Joined: 01 Jun 2021
Posts: 2
Location: Singapore

PostPosted: Tue Jun 01, 2021 11:43 am
Reply with quote

Nenoch Laxa wrote:
Hello, can you so kindly help out a sister?
---
This is my input file:
---
HDRmmddyy ---> header record
DTLrec01 ---> actual detail record #1
DTLrec02 ---> actual detail record #2
DTLrec03 ---> actual detail record #3
DTLrec04 ---> actual detail record #4
TRL000004 ---> trailer record
---
How do I write the actual JCL ICETOOL command for this:
---
STEP01 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//DD01 DD DSN=TEST.INPUT.DATA,DISP=SHR
//DD02 DD SYSOUT=*
//TOOLIN DD *
COUNT FROM(DD01)
Write in sysout message: REC. CNT = 000004 -----> result icetool count
Write in DD02=sysout: TRLCNT = '000004' ----> from trailer record
IF RC=4 or EMPTY
write in DD02=sysout 'File is Empty'
ELSE
IF RC=0 or NOT-EMPTY
write in DD02=sysout '# recs. in file: ' 000004 ----> result icetool count
//*
Back to top
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1084

PostPosted: Tue Jun 01, 2021 11:59 am
Reply with quote

No code tags - no further discussion.
Back to top
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1084

PostPosted: Tue Jun 01, 2021 3:38 pm
Reply with quote

Code:
Any code sample
Must be HERE
   And properly aligned
   For any interested person
   To be able to understand the logic of this code,
WITHOUT SPECIAL EFFORTS!!

Otherwise do not expect any response, at least in the nearest future... 358.gif
Back to top
View user's profile Send private message
Joerg.Findeisen

Active Member


Joined: 15 Aug 2015
Posts: 518
Location: Bamberg, Germany

PostPosted: Tue Jun 01, 2021 4:01 pm
Reply with quote

sergeyken wrote:
Code:
Any code sample
Must be HERE
   And properly aligned
   For any interested person
   To be able to understand the logic of this code,
WITHOUT SPECIAL EFFORTS!!

Same formatting is also helpful if applied for expected output(s).

Remember that people who respond here spend their free time to help others.
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 COBOL Table data to a flat file with ... COBOL Programming 8
No new posts Compare 2 files replace data in 1st f... DFSORT/ICETOOL 4
No new posts Merging 2 files but ignore duplicate... DFSORT/ICETOOL 1
No new posts DB2 SQL query to read and update data... DB2 12
This topic is locked: you cannot edit posts or make replies. copy file 2 data into file1 for match... DFSORT/ICETOOL 4
Search our Forums:

Back to Top