View previous topic :: View next topic
|
Author |
Message |
Nenoch Laxa
New User
Joined: 01 Jun 2021 Posts: 2 Location: Singapore
|
|
|
|
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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2142 Location: USA
|
|
|
|
CODE TAGS!!! |
|
Back to top |
|
|
Nenoch Laxa
New User
Joined: 01 Jun 2021 Posts: 2 Location: Singapore
|
|
|
|
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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2142 Location: USA
|
|
|
|
No code tags - no further discussion. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2142 Location: USA
|
|
|
|
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... |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1337 Location: Bamberg, Germany
|
|
|
|
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 |
|
|
|