Im trying to create control cards with a clist and skeleton but the
file tailoring keeps changing it to upper case. Its required for a Connect Dirrect process from mainframe to aix box.
Thanks Enrico. I could look at converting it to rexx. I wanted to keep it simple. The process is tringgered by a Connect Direct upload from a server
that needs to submit generic JCL jobs with one single Clist or Rexx program in the first JCL step to create the transmit and signon cards for the Aix system. Which need to be lower case for the password and node. Also the clist or rexx program needs to be able to update a system generated temporary file so we don't have to maintain multiple file tailoring members. Here is the complete JCL and Clist. I think that the clist is converting to upper-case in the variable assignment proc statements at the top of the clist or in the file tailoring process. I know when you use put statements and asis statement for building control cards it will stay lowercase but I need to use file tailoring to use minimal coding and let the built in functions do most of the work. I just need to be able to tell it to maintain the lower case somehow or somewhere just not sure at this point where the issue is or even if it can be done this way with a clist.
Here is the complete JCL And the complete clist being called.
Thanks for all your input..... James
Code:
//MRU044AB JOB (TD,TS),'PSSG',MSGCLASS=X,CLASS=J,
// REGION=0M
//STEP01 EXEC PGM=IKJEFT1B
//ISPSLIB DD DSN=SYS1.ISPF.SISPSENU,DISP=SHR
//ISPMLIB DD DSN=SYS1.ISPF.SISPMENU,DISP=SHR
//ISPPLIB DD DSN=SYS1.ISPF.SISPPENU,DISP=SHR
//ISPTLIB DD DSN=SYS4.ISPTLIB,DISP=SHR
// DD DSN=SYS1.ISPF.SISPTENU,DISP=SHR
//ISPTABL DD DSN=SYS4.ISPTLIB,DISP=SHR
// DD DSN=SYS1.ISPF.SISPTENU,DISP=SHR
//ISPPROF DD DISP=(NEW,DELETE),UNIT=WORK,
// SPACE=(TRK,(10,0,5),RLSE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=6160)
//ISPLOG DD DISP=(NEW,DELETE),UNIT=WORK,
// SPACE=(TRK,(10,0),RLSE),
// DCB=(RECFM=VA,LRECL=125,BLKSIZE=129)
//ISPCTL1 DD DISP=(NEW,DELETE),UNIT=WORK,
// SPACE=(TRK,(50,0),RLSE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=6160)
//SYSOUT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=D
//SYSPROC DD DSN=MR35.LIBTDC.ISPCLIB,DISP=SHR
// DD DSN=SYS4.ISPCLIB,DISP=SHR
//* temp file allcated and called in clist for passing control cards
//NDMCARDS DD DSN=&&NDMPROC,DISP=(,PASS),UNIT=WORK,
// SPACE=(TRK,(5,5,5),RLSE),
// DCB=(LRECL=80,RECFM=FB,BLKSIZE=8000)
//* clist called here with lower case signon for control card
//SYSTSIN DD *
ISPSTART CMD(%IFGLT1V MR35.SEQGLT1A +
NDM.MORPRS FINIPPRFTP03 izmof02 ifis2007iz)
/*
//*************************************************
//* output step to test build of control cards to a temp file
//STEP02 EXEC PGM=ICEGENER,COND=(0,NE)
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=&&NDMPROC(NDMCARDS),DISP=(OLD,PASS)
//*
//SYSUT2 DD SYSOUT=*
//SYSIN DD DUMMY
//*
Clist to build the control cards
Code:
EDIT MR35.LIBTDC.ISPCLIB(IFGLT1V) - 01.00 Member
Command ===> Scr
****** ***************************** Top of Data
000100 PROC 5 DATASET PNODE SNODE SNODEID SNPASS
000200 /* CLIST TO :
000300 /* 1) LISTC LVL COMMAND TO CAPTURE UPLOADED FILE NAME
000400 /* 2) FILE TAILORED CONNECT CONTROL CARDS
000500 /* GENERIC FOR ALL NDM TO AIX PROCESS
000800 /*
000820 CONTROL MSG LIST CONLIST SYMLIST NOFLUSH END(ENDD) ASIS
000830 /*FILE TRAP CODE
000840 SET SYSOUTLINE = 0
000850 SET SYSOUTTRAP = 500
000860 LISTC LVL(&DATASET) NAME
000870 SET &BOT = &SYSOUTLINE
000880 SET &BOTM1 = &BOT - 1
000890 SET &J = 1
000900 /*
001000 DO WHILE &BOT >+ &J
001100 SET &TEMP = &STR(&&SYSOUTLINE&J)
001200 SET &TEMP2 = &STR(&&SYSOUTLINE&J)
001200 SET &TEMP2 = &STR(&&SYSOUTLINE&J)
001300 IF &LENGTH(&STR(&TEMP)) > 45 THEN +
001400 DO
001500 SET &L = &LENGTH(&STR(&TEMP))
001600 WRITE &TEMP
001700 IF &SUBSTR(1:7,&TEMP) = NONVSAM AND +
001800 &SUBSTR(31:34,&TEMP) = MOF1 THEN +
001810 DO
001820 SET &FROMDSN = &SUBSTR(17:46,&TEMP)
001830 SET &FND1 = MR35
001840 SET &FND2 = &SUBSTR(21:46,&TEMP)
001850 SET &TODSN = &SUBSTR(31:46,&TEMP)
001852 ENDD
001853 ENDD
001854 SET &J = &J + 1
001855 ENDD
001856 /*
001857 /* BUILD AND FILE TAILOR CONTROL CARDS TO TEMP FILE
001858 /* ALLOCATED IN JCL.
001859 ISPEXEC LIBDEF ISPSLIB DATASET ID('MR35.LIBTDC.ISPSLIB')
001860 /* ISPFILE REQUIRED BUT NOT USED FOR STORING CONTROL CARDS.
001861 ALLOC F(ISPFILE) DA('MR35.LIBTDC.JCLLIB') SHR REUSE
001862 ISPEXEC FTOPEN
001870 ISPEXEC FTINCL IFGLT1X
001880 ISPEXEC FTCLOSE NAME(NDMCARDS) LIBRARY(NDMCARDS)
ok, I will rebuild it in Rexx. I don't do much rexx here. I've been here for 21 years and they have 1000's of clist programs but rexx has creeped in here and there. Governement is slow to change. ;)
and here is how it should be file tailored in its final form
Code:
NDMTRANS PROC PNODE=TORPRD -
SNODE=FINIPPRFTP03 -
SNODEID=(izmof01,ifis2002iz)
STEP01 COPY FROM (PNODE -
DSN=MR00.SEQGLTST.MOF10218.D130204
DISP=(OLD,DELETE)) -
COMPRESS -
TO (SNODE DSN=MOF10218.D130204)
here is the clist calling statement in the jcl that passes the dataset
listc argument to limit search to the first two highlevel qualifiers of the dataset name. We restrict usage of this naming convention so multiple finds are rare and I will take care of that issue at another point.
ISPSTART CMD(%IFGLT1V MR35.SEQGLT1A +
NDM.MORPRS FINIPPRFTP03 izmof02 ifis2007iz)
This still comes down to a lowercase issue, the process works fine up till that point.
Here is a REXX script that You might find useful
the only thing that I did not do was to build the datasets names
according to Your rules
I just used the <from> asis and arbitrarily prepended "OUTPUT." to the <to>
but the overall logic is pretty sound
note how I postponed the file tailoring preamble after having received a
0 return code from the listc
it could even be done later after having processed and kept at least one good
dataset name
If ( Sysvar(SYSISPF) \= "ACTIVE" ) Then Do
Say left(_cmd,8)"- Ispf is not active. Command terminated"
exit 4
End
parse arg dslevl frnode tonode touser topass
call $ispex "CONTROL ERRORS RETURN"
/* extract the dataset' s names */
call outtrap "listc."
listrc = $tsoex("listc level('"dslevl"')")
call outtrap "off"
if listrc = 0 then do
call $ispex "FTOPEN TEMP"
if RC \= 0 then do
Say left(_cmd,8)"- FTOPEN Error RC("rc") "
Say left(_cmd,8)"- Command terminated"
exit 4
end
/* process the header */
call $ispex "FTINCL ZMF01HDR"
if RC \= 0 then do
Say left(_cmd,8)"- FTINCL Error RC("rc") for the Hdr"
Say left(_cmd,8)"- Command terminated"
exit 4
end
ds = 0
do i = 1 to listc.0
if pos("NONVSAM ------- ", listc.i) > 0 then do
ds = ds + 1
stepnm = "STEP" || right(ds,3,"0")
frdsnm = strip(substr(listc.i, 17, 44))
todsnm = "OUTPUT." || frdsnm
call $ispex "FTINCL ZMF01DTL"
if RC \= 0 then do
Say left(_cmd,8)"- FTINCL Error RC("rc") file("ds")"
Say left(_cmd,8)"- Command terminated"
call $ispex "FTCLOSE"
exit 4
end
end
end
/* process trailer */
call $ispex "FTINCL ZMF01TRL"
if RC \= 0 then do
Say left(_cmd,8)"- FTINCL Error RC("rc") for the Trl"
Say left(_cmd,8)"- Command terminated"
exit 4
end
call $ispex "FTCLOSE"
if RC \= 0 then do
Say left(_cmd,8)"- FTCLOS Error RC("rc") "
Say left(_cmd,8)"- Command terminated"
exit 4
end
call $ispex "VGET ZTEMPF"
call $ispex "VIEW DATASET('"ztempf"')"
end
else do
say left(_cmd,8)"- Listc ended with RC("listrc") "
end
I'll load her up and do a few mods to see if I can get it to give me the output I need.
I see its extracting your allocations, I should be able to use that idea some place else too.