cancel
Showing results for 
Search instead for 
Did you mean: 

INZTAP and autoloader device...

Former Member
0 Kudos

Hi,

I want to know if it's possible to INZTAP a tape cartridge in a unatended way, every time that our autoloader ( 3580, 3573 ) loads a tape, for example our daily backup needs two tapes, the first one is easily initialized in our CL, but as we don't know when it will be necessary the second one we cannot INZTAP in our code.

I know that's possible to add an automatic answer in *SYSRPYL for message CPA4060, but this only works if the loaded tape is not initialized. I want to INZTAP even previously initialized tapes in order to delete in a quick way their contents.

Any idea ? Is this an stupid question ?

Regards,

Joan B. Altadill

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

It is easier to not have to initialize the tape.

When you do the save set an expiry date.

If you use the tape after that date and specify sequence 1 for the first save the files will be overwritten.

Regards

Bill Shane

iSeries System Administrator - DBA

SAP BASIS Administrator

Technicolor Canada

Bill.Shane@thomson.net

Former Member
0 Kudos

Hi Bill,

You're right, it's not necessary to INZTAP at all, just a proper use of EXPDATE is enough. I've started to change my CL's.

But what is surprising to me is that the CL language has a practically no options to manipulate dates. My idea is to recover the actual date and add some days, maybe 28 or 29, to calculate the expiration date of the tape ( param. EXPDATE ). I've tried to find any CL snippet that perform this task but are too complex.

Is there any utility like CVTDAT ?? What options do you use ??

Regards,

Joan

Former Member
0 Kudos

Hi Joan,

There is couple of ways that you can do that.

I use the old ADDDAT command from the TAATOOLS that came from a V3 release of the operating system.

On another system that does not have the TAATOOLS I have a CLLE program that uses the CEELOCT and CEEDATE API’s to add a number of days to the current date.

These API’s are supplied by IBM, they use the Lillian date.

It also retrieves the QDATFMT to format the date in that format.

If you email me directly I can send you the code I have, it is quite short.

Regards

Bill

Bill.Shane@thomson.net

Former Member
0 Kudos

Hi Joan,

I do use the CVTDAT and it works.

I do use it to SUBSTRACT days from today, so i can delete old journal recievers. But you should be able to adjust it to ADD days:

/* OPZOEKEN QDATE *Today */

RTVSYSVAL SYSVAL(QDATE) RTNVAR(&DATUM1)

CVTDAT DATE(&DATUM1) TOVAR(&DATUM2) FROMFMT(*SYSVAL) +

TOFMT(LONGJUL) / longjul = jjjj/ddd */

CHGVAR VAR(&DATUM2d) VALUE(%SST(&DATUM2 6 3)) /* ddd */

CHGVAR VAR(&DATUM2j) VALUE(%SST(&DATUM2 1 4)) /* jjjj */

CVTDAT DATE(&DATUM1) TOVAR(&DATUM3) FROMFMT(SYSVAL) TOFMT(DMY)

CHGVAR VAR(&MSG) VALUE('Vandaag is het (DMY):' *BCAT &DATUM3)

CALL PGM(SND_MSG) PARM(&HDR &MSG)

SNDPGMMSG MSG(&MSG)

/* today - DayLeave dagen */

CHGVAR VAR(&DayLeaveN) VALUE(&DayLeave) /* convert CHAR to DEC */

CHGVAR VAR(&DATUM2d) VALUE(&DATUM2d - &DayLeaveN - 1)

IF COND(&DATUM2d LT 0) THEN(DO) / vorig jaar */

CHGVAR VAR(&DATUM2d) VALUE(&DATUM2d + 365)

CHGVAR VAR(&DATUM2j) VALUE(&DATUM2j - 1)

ENDDO

CHGVAR VAR(&DATUM2jc) VALUE(&DATUM2j)

CHGVAR VAR(&DATUM2dc) VALUE(&DATUM2d)

CHGVAR VAR(&DATUM2) VALUE(&DATUM2jc *TcaT '/' *TCAT &DATUM2dc)

/* Weergeven today - 4 dagen */

CVTDAT DATE(&DATUM2) TOVAR(&DATUM3) FROMFMT(*LONGJUL) +

TOFMT(DMY) / jjjj/ddd := DD:MM:YY */

Answers (1)

Answers (1)

Former Member
0 Kudos

Perhaps you should try messigid CPA4278 to overwrite your tape.

regards thomas