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

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

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

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

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

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

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

Senior Member


Joined: 15 Aug 2015
Posts: 1255
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top