Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ICETOOL and last field from variable record

107 views
Skip to first unread message

Radoslaw Skorupka

unread,
Aug 2, 2021, 9:00:46 AM8/2/21
to
(yet another DFSORT question)

Source file is RECFM=VB. Last field is text, expected values are YES,
NO, UNKNOWN
The goal is to put this field in ICETOOL report, like
...
ON(45,7,CH)  HEADER('status')

However it doesn't work.
Is it possible to change DFSORT behavior and logically add spaces to the
field?

I see the following solution - just to copy source file to FB and then
process it.

Does any simpler solution exist?

--
Radoslaw Skorupka
Lodz, Poland

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to list...@listserv.ua.edu with the message: INFO IBM-MAIN

S.Karthik Premnath

unread,
Aug 2, 2021, 10:45:33 AM8/2/21
to
HTH,

1) Hope the RDW 4 bytes are considered while processing the VB file.
2) Please check if the card below is working.

//CTL1CNTL DD *
OPTION COPY
OUTREC IFTHEN=(WHEN=(45,2,CH,EQ,C'NO'),
BUILD=(1:1,44,45:45,2,48:5X)),
IFTHEN=(WHEN=(45,2,CH,EQ,C'YES'),
BUILD=(1:1,44,45:45,3,48:4X))
/*

Above statement adds 5 spaces with NO records & 4 spaces with YES records &
ignore records with UNKNOWN.


Karthik Premnath.





On Mon, Aug 2, 2021 at 6:30 PM Radoslaw Skorupka <R.Sko...@hotmail.com>
wrote:

Sri h Kolusu

unread,
Aug 2, 2021, 11:51:01 AM8/2/21
to
Radoslaw,

It would have been nice if you showed me the complete control cards. I am
going to take an educated guess and the reason you are not getting the
right results is due to the fact that you have short records and you
referring to fields beyond the length stored in RDW.

Do you see an ICE218A message in your DFSMSG sysout?

> I see the following solution - just to copy source file to FB and then
> process it. >
> Does any simpler solution exist?

Ofcourse there is. Assuming your last field you are referring is at
position 45 for a length of 7 bytes, you can overlay the 52 position with a
space so that all of your records are atleast 52 bytes in length.

You can do with the following

INREC OVERLAY=(52:X)


If you hae trouble incorporating that logic, then please show me your
complete ICETOOL step and I can show you the modified version.

Thanks,
Kolusu

Sri h Kolusu

unread,
Aug 2, 2021, 11:53:02 AM8/2/21
to
> 2) Please check if the card below is working.


Karthik,

You don't need multiple IFTHEN statements. A simple Overlay of 52 byte with
a space will get the desired results for OP

Thanks,
Kolusu

S.Karthik Premnath

unread,
Aug 2, 2021, 1:55:42 PM8/2/21
to
Such a neat solution Kolusu, thanks. I'll try it out.

Thanks,
Karthik Premnath.

Radoslaw Skorupka

unread,
Aug 2, 2021, 4:06:35 PM8/2/21
to
Sri,

Complete control cards:

SORT    FROM(WEJDATA) TO(TEMP) USING(REPO)
DISPLAY FROM(TEMP0001) LIST(PRINT) -
         PAGE -
         TITLE('Some title')-
DATE(DM4-) -
         TIME(24:)  -
         BLANK -
         NOCC -
      ON(19,8,CH) HEADER('user') -
         ON(10,10,CH)   HEADER('opis') -
         ON(45,7,CH) HEADER('status')
//REPOCNTL DD *
  OPTION COPY,VLSCMP
  INCLUDE COND=(5,5,CH,EQ,C'ABCDE')

And yes, the message ICE218A appears in the DFSMSG DD

And finally - I added
INREC OVERLAY=(52:X)
and now it works.

Thank you again!

Regards
--
Radoslaw Skorupka
Lodz, Poland




W dniu 02.08.2021 o 17:50, Sri h Kolusu pisze:

Sri h Kolusu

unread,
Aug 2, 2021, 4:27:32 PM8/2/21
to
> and now it works.

Radoslaw,

Hmm are you sure you are getting the right results? Unless you typed in the
JCL, that wouldn't give you the right results.

Reason : Your first COPY operation is writing the output to a ddname called
"TEMP', However your DISPLAY is reading from the ddname TEMP0001 so unless
this is a version that you decided to show here, it wouldn't work.

Also you do not require SORT operator as you overwriting that with COPY
operator in REPOCNTL

So here is the modified JCL that should give you the desired results.


//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//WEJDATA DD DISP=SHR,DSN=Your Input RACF unload
//TEMP DD DSN=&&TMP,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE)
//PRINT DD SYSOUT=*
//TOOLIN DD *
COPY FROM(WEJDATA) TO(TEMP) USING(REPO)
DISPLAY FROM(TEMP) LIST(PRINT) -
PAGE -
TITLE('SOME TITLE') -
DATE(DM4-) -
TIME(24:) -
BLANK -
NOCC -
ON(19,08,CH) HEADER('USER') -
ON(10,10,CH) HEADER('OPIS') -
ON(45,07,CH) HEADER('STATUS')
/*
//REPOCNTL DD *
OPTION VLSCMP
INCLUDE COND=(5,5,CH,EQ,C'ABCDE')
INREC OVERLAY=(52:X)
/*


Further if you have any questions please let me know

Thanks,
Kolusu
DFSORT Development
IBM Corporation

Radoslaw Skorupka

unread,
Aug 3, 2021, 4:44:15 AM8/3/21
to
Sri,

Yes, you are right, it should be just TEMP in both statements.
And the SORT statement was inherited from former report where sort is
really present.
This example is "in progress", so it is not finished. It is likely there
will be sort here again.
And some details where changed to anonimize the report :-)

However I confirm - INREC statement made the task working properly.

Thank you!

--
Radoslaw Skorupka
Lodz, Poland





W dniu 02.08.2021 o 22:27, Sri h Kolusu pisze:
0 new messages