View previous topic :: View next topic
|
Author |
Message |
pavan reddy
New User
Joined: 21 Dec 2020 Posts: 15 Location: India
|
|
|
|
Hi,
I am trying to report the datasets referred in last 2 days using ICE tool from the dcollect output. I have the HEADER coded as below
HEADER('lastref') ON(117,4,DT3,E'9999/999')
but when reporting not getting it right(getting as below)
lasteref
---------
2121/076
2121/076
can someone help me on how to find the correct format to be used in ICETOOL(to pull from a dcollect report)
Thanks,
Pavan. |
|
Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2209 Location: USA
|
|
|
|
You need mandatory:
1) to learn how to use code tags in your message
2) to present exactly the sample of content of your input file
3) to present exactly the FULL control statements you tried to use
4) to present exactly the sample of expected output
5) to present exactly the real output you’ve got
Without all those done, there is a very little chance you would get a satisfactory answer, if any. |
|
Back to top |
|
 |
pavan reddy
New User
Joined: 21 Dec 2020 Posts: 15 Location: India
|
|
|
|
Code: |
/ICE EXEC PGM=ICETOOL
//SYSPRINT DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//RAWDCOL DD DSN=X,DISP=SHR <-- X is dcollect output dataset
//DCOL1 DD DSN=&TEMPV,SPACE=(TRK,(200,200),RLSE),UNIT=SYSDA,
// DISP=(NEW,PASS,DELETE)
//DCOL2 DD DSN=&TEMPV,SPACE=(TRK,(200,200),RLSE),UNIT=SYSDA,
// DISP=(NEW,PASS,DELETE)
//DCOL3 DD DSN=&TEMPV,SPACE=(TRK,(200,200),RLSE),UNIT=SYSDA,
// DISP=(NEW,PASS,DELETE)
//OUT#REP DD DSN=Y,UNIT=SYSDA, --> Y datasets where output is written to
// DISP=(,CATLG,DELETE),SPACE=(TRK,(20,20),RLSE)
//TOOLIN DD *
SORT FROM(RAWDCOL) TO(DCOL1) USING(SMFI)
SORT FROM(DCOL1) TO(DCOL2) USING(CTL1)
DISPLAY FROM(DCOL2) LIST(OUT#REP) -
TITLE('DATASET REPORT') DATE TIME PAGE -
HEADER('DATASETNAME') ON(29,44,CH) -
HEADER('VOLSER') ON(83,6,CH) -
HEADER('LASTREF') ON(117,4,DT3,E'9999-999') -
HEADER('SIZE') ON(93,4,FI) -
BLANK
/*
//SMFICNTL DD *
INCLUDE COND=(9,1,CH,EQ,C'D')
SORT FIELDS=(29,44,CH,A)
SUM FIELDS=(93,4,FI)
//*
//CTL1CNTL DD *
OPTION COPY
OMIT COND=(117,4,PD,LT,2021076)
|
output :
Code: |
DATASETNAME VOLSER LASTREF SIZE
----------------------------------------- ---------- ---------- --------
xxxx.xxxx.xxxx.xxx yyyyyy 2121/078 57484352 |
The year format for some reason reports as 2121, not able to find what is wrong
Coded for you |
|
Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2209 Location: USA
|
|
|
|
1) learn how to use code tags
2) what exactly do you have on input? You can print a separate output file, or specific field(s) of it, without any conversion applied (maybe, convert to HEX for clarity)
You are trying to guess, and to assume too many things. It would be useful to verify each of your assumption by printing the actual values. In that case, highly likely, you would find the reason of your issue by yourself. |
|
Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3087 Location: NYC,USA
|
|
|
|
117,4 - Is this the right offset? Please use code tags. |
|
Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2209 Location: USA
|
|
|
|
The given sample of code doesn’t match the sample of output.
The only formatting pattern in the code is E’9999-99’, while the only example of output is ‘2121/078’
This is “fake information”. Nothing to discuss, before any correct information, and all missing data are provided. |
|
Back to top |
|
 |
pavan reddy
New User
Joined: 21 Dec 2020 Posts: 15 Location: India
|
|
|
|
117,4 - Is this the right offset? - Yes it is right i am sorting data from IDCAMS DCOLLECT output. below is the Dcollect record output structure interpreting dcollect output
112(X'70')
CHARACTER 4 DCDLSTRF DATE LAST REFERENCED (yyyyddd F)
sorry I am not getting "1)learn how to use code tags" what is the code tags that you are referring.
Regarding the output i just typed one line to show how the output looks like as i couldn't copy nothing fake. I provided the complete job i ran and the sample output of how it looks like not sure why you say this is fake information. |
|
Back to top |
|
 |
pavan reddy
New User
Joined: 21 Dec 2020 Posts: 15 Location: India
|
|
|
|
Not sure if this is what you are looking for where/how the input is generated. Below is the JCL to generate dcollect output
//STEP010 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//DCOUT* DD DSN=X,
// DISP=(NEW,CATLG),
// SPACE=(CYL,(10,1),RLSE),
// DCB=(RECFM=VB,BLKSIZE=27998),
// UNIT=SYSDA
//SYSIN DD *
DCOLLECT -
OUTFILE(DCOUT) -
VOLUMES(V*)
/*
The output of above is the input for my ICETOOL job |
|
Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1387 Location: Bamberg, Germany
|
|
|
|
When you post there is a button called "Code" that you hit. Type the Code or Data to present and hit the "Code" button again. Couldn't be more simple.
Change:
Code: |
HEADER('LASTREF') ON(117,4,DT3,E'9999/999') |
To:
Code: |
HEADER('LASTREF') ON(117,4,PD,E'9999/999') |
Output:
Code: |
DATASET REPORT 03/23/21 07:03:44 - 1 -
DATASETNAME VOLSER LASTREF SIZE
-------------------------------------------- ------ -------- -----------
SOMTHNG.CAR2101P.JA.CNTL SMSVOL 2021/082 221
SOMTHNG.CA1.DTA.AUSW.SUMMEN SMSVOL 2021/082 55
SOMTHNG.CA1.VTL.BACKEND.WASTE SMSVOL 2021/082 55 |
Task done. |
|
Back to top |
|
 |
pavan reddy
New User
Joined: 21 Dec 2020 Posts: 15 Location: India
|
|
|
|
Thank you, That worked( I actually tried PD for YYYY-MM-DD format but it didn't worked as expected so assumed it won't work for Julian date as well).
Below are the ones that i tried
Code: |
HEADER('LASTREF') ON(117,4,PD,E'9999-99-99' |
Code: |
HEADER('LASTREF') ON(117,4,DT1,E'9999/99/99' |
Code: |
HEADER('LASTREF') ON(117,4,DT3,E'9999-999' |
Julain format is what I need and using the PD format it is reporting as expected.
Thanks for your help. |
|
Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2209 Location: USA
|
|
|
|
pavan reddy wrote: |
Thank you, That worked( I actually tried PD for YYYY-MM-DD format but it didn't worked as expected so assumed it won't work for Julian date as well).
Below are the ones that i tried
Code: |
HEADER('LASTREF') ON(117,4,PD,E'9999-99-99' |
Code: |
HEADER('LASTREF') ON(117,4,DT1,E'9999/99/99' |
Code: |
HEADER('LASTREF') ON(117,4,DT3,E'9999-999' |
Julain format is what I need and using the PD format it is reporting as expected.
Thanks for your help. |
The major conclusion: there is absolutely no reason to ask questions like this one at the forum. The demonstrated problem is a normal everyday issue which can be easily solved by minor testing of your code, and comparison of results. This is a classic job for any software engineer (which he is paid for). |
|
Back to top |
|
 |
pavan reddy
New User
Joined: 21 Dec 2020 Posts: 15 Location: India
|
|
|
|
The reason I brought it up is to find out why the DT1 and DT3 formats are not reporting as expected, Thanks for the support. |
|
Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2209 Location: USA
|
|
|
|
pavan reddy wrote: |
The reason I brought it up is to find out why the DT1 and DT3 formats are not reporting as expected, Thanks for the support. |
In your case, DT1, and DT3 formats are not reporting as YOU expected, but they are definitely reporting as the DEVELOPERS OF ICETOOL expected.
In all cases like this one, a typical recommendations must be, as I mentioned:
1) print or display EXACTLY the content of your input fields under question. Do not rely on your hidden “assumptions” or “guessing”
2) try to use several variants of input values for testing
3) try to use several versions of your conversion/processing code, or parameters
4) print or display EXACTLY the content of your output fields, for EVERY version of your conversion code, and for EVERY variant of your input data.
5) compare all printed results, and try to use a sort of common sense to understand: why your original results are not what you expected? In most cases the reason would be - misunderstanding of the description taken from a manual (which in turn are often quite messy, or even misleading, or using a terminology different from the one you are familiar with)
6) even if you did not understand the reason of your issue, it always makes sense to ask your question at the forum, INCLUDING ALL THE PRINTED RESULTS mentioned in 1-5. |
|
Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3087 Location: NYC,USA
|
|
|
|
Quote: |
The major conclusion: there is absolutely no reason to ask questions like this one at the forum. The demonstrated problem is a normal everyday issue which can be easily solved by minor testing of your code, and comparison of results. This is a classic job for any software engineer (which he is paid for). |
I disagree to this. Everyone takes learnings on Mainframes in different ways based on the experience level and this is one of the way to do it and I don't see anything wrong in it. Over a period of time when one gets 20+,30+,40+ years of Mainframes experience then they won't be asking these type of questions.
Second , TS has tried but did not work and hence posted on this forum ( as expected) and got the solution as well, End of the story. Your Advise is good to follow but can not be always a pre requisite before posting a quesiton on this forum.
Topic is locked. |
|
Back to top |
|
 |
|
|