×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




As much as I'd like to promote BRMS and having meaningful tape names is
long dead I suspect that's not an option for your shop. So try this:
DCL VAR(&JOBDATE) TYPE(*CHAR) LEN(6)
DCL VAR(&YYMMDD) TYPE(*CHAR) LEN(6)
RTVJOBA DATE(&JOBDATE)
CHGVAR VAR(&YYMMDD) VALUE(%sst(&jobdate 5 2) *cat +
%sst(&jobdate 1 4))
SNDMSG MSG(&YYMMDD) TOUSR(ROB)

On Tue, Aug 8, 2023 at 4:30 AM Patrik Schindler <poc@xxxxxxxxxx> wrote:

Hello,

I want my Save 21 tapes are meant to have a label YYMMDD applied without
much manual information. I began to write a CL program like this:

DCL VAR(&TAPDRV) TYPE(*CHAR) LEN(5) VALUE(TAP01)
DCL VAR(&SYSYR) TYPE(*CHAR) LEN(2)
DCL VAR(&SYSMON) TYPE(*CHAR) LEN(2)
DCL VAR(&SYSDAY) TYPE(*CHAR) LEN(2)
DCL VAR(&TAPLBL) TYPE(*CHAR) LEN(6)

RTVSYSVAL SYSVAL(QYEAR) RTNVAR(&SYSYR)
RTVSYSVAL SYSVAL(QMONTH) RTNVAR(&SYSMON)
RTVSYSVAL SYSVAL(QDAY) RTNVAR(&SYSDAY)

CHGVAR VAR(&TAPLBL) VALUE(&SYSYR *CAT &SYSMON *CAT &SYSDAY)

Unfortunately, the system values aren't padded with 0's when single-digit
which creates ambiguity.

I could hard code 18 lines of "if day equals 1 then change variable to be
01", and so on. This seems to be pretty ugly. How would you solve this in
CL(LE)?

Thanks!

:wq! PoC

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.