|
View previous topic :: View next topic
|
| Author |
Message |
haleyja
New User
Joined: 09 Mar 2006 Posts: 15
|
|
|
|
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.
any help...
clist code doing file tailor
| Code: |
ISPEXEC LIBDEF ISPSLIB DATASET ID('MR35.LIBTDC.ISPSLIB')
ALLOC F(ISPFILE) DA('MR35.LIBTDC.JCLLIB') SHR REUSE
ISPEXEC FTOPEN
ISPEXEC FTINCL IFGLT1X
ISPEXEC FTCLOSE NAME(NDMCARDS) LIBRARY(NDMCARDS)
|
control card in JCL calling clist
| Code: |
ISPSTART CMD(%IFGLT1X MR35.SEQGLT1A +
NDM.MORPRS FINIPPRFTP03 izmof02 ifis2007iz)
|
any suggestions???
Thanks |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10900 Location: italy
|
|
|
|
if You skel contains lower case data, it will produce lower case output
just tested with
skel
| Code: |
EDIT ENRICO.ISPF.SKELS(JSKEL) - 01.05 Columns 00001 00072
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 )DO JNUM = 1 TO &JMAX
000002 //J&JNUM JOB (ACCT),'JSKEL',NOTIFY=ENRICO
000003 // CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1)
000004 //* job &JNUM OF &JMAX
000005 //* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
000006 //* a lower case var &lcasevar
000007 //* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
000008 )DO SNUM = 1 TO &SMAX
000009 //S&SNUM EXEC PGM=IEFBR14
000010 //* job &JNUM OF &JMAX
000011 //* step &SNUM OF &SMAX
000012 //* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
000013 )ENDDO
000014 //*
000015 )ENDDO
****** **************************** Bottom of Data **************************** |
REXX script
| Code: |
EDIT ENRICO.ISPF.EXEC(ZSKEL) - 01.04 Columns 00001 00072
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 /* REXX */
000002 Trace "O"
000003 jmax = 1
000004 smax = 1
000005 lcasevar = "low case data"
000006 call $ispex "FTOPEN TEMP"
000007 call $ispex "FTINCL JSKEL"
000008 call $ispex "FTCLOSE "
000009 call $ispex "VGET ZTEMPF "
000010 call $ispex "VIEW DATASET('"ztempf"')"
000011 Exit 0
000012
000013 /* */
000014 $ispex:
000015 isp_0tr = trace("O")
000016 Address ISPEXEC arg(1)
000017 isp_0rc = rc
000018 trace value(isp_0tr)
000019 return isp_0rc
****** **************************** Bottom of Data **************************** |
result
| Code: |
VIEW ENRICO.SPFTEMP1.CNTL Columns 00001 00072
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 //J1 JOB (ACCT),'JSKEL',NOTIFY=ENRICO,
000002 // CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1)
000003 //* job 1 OF 1
000004 //* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
000005 //* a lower case var low case data
000006 //* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
000007 //S1 EXEC PGM=IEFBR14
000008 //* job 1 OF 1
000009 //* step 1 OF 1
000010 //* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
000011 //*
****** **************************** Bottom of Data **************************** |
I just RElooked at Your way of invoking the script and certainly
the issue is due to the way You parse the arguments
check Your way of doing things and NOTE
the difference in casing when using different argument parsing clauses
the script
| Code: |
EDIT ENRICO.ISPF.EXEC(PARS) - 01.00 Columns 00001 00072
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 /* REXX */
000002 Trace "O"
000003 parse arg args
000004 say "parse arg >>"args"<<"
000005 arg args
000006 say " arg >>"args"<<"
****** **************************** Bottom of Data **************************** |
the result
| Code: |
===> pars a bb ccc dddd
parse arg >>a bb ccc dddd<<
arg >>A BB CCC DDDD<< |
note the difference when using parse arg and arg |
|
| Back to top |
|
 |
haleyja
New User
Joined: 09 Mar 2006 Posts: 15
|
|
|
|
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) |
|
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10900 Location: italy
|
|
|
|
| unfortunately the chances of getting help on CLISTs are pretty slim |
|
| Back to top |
|
 |
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Cut your losses now.
Covert it to REXX. It may very well solve your problem.
100 out of 100 experts will tell you to write this in REXX.
Ignore this advice at your own peril.
PS - IBM moved from Clist to Rexx in 1986. My boss made me stop writing in clist in 1989. I have written thousands of Rexx programs since. |
|
| Back to top |
|
 |
haleyja
New User
Joined: 09 Mar 2006 Posts: 15
|
|
|
|
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. ;)
Thanks for twisting my arm...
I'll post my problems if any arise. ;)
James |
|
| Back to top |
|
 |
Stefan
Active User

Joined: 12 Jan 2006 Posts: 110 Location: Germany
|
|
|
|
AFAIK there is no way to let a CLIST accept lowercase data as parameter. In the manuals (explanation of PROC statement) is clearly explained:
| Quote: |
| Parameter values in lowercase are changed to uppercase. |
I've made my own short check to verify this.
So I recommend re-writing your small application in REXX. Your co-workers and successors should and will be happy about this, I suppose. |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10900 Location: italy
|
|
|
|
the snippet as posted looks a bit flawed to me ...
no provision is made for multiple datasets found
if You' d post clearly the requirements ..
for example the EXACT description of the output to be produced
and the skel You plan to use
You might get better help |
|
| Back to top |
|
 |
haleyja
New User
Joined: 09 Mar 2006 Posts: 15
|
|
|
|
Enrico,
Here is the Skeleton
| Code: |
LTSTRANS PROC PNODE=&PNODE -
SNODE=&SNODE -
SNODEID=(&SNODEID,&SNPASS)
STEP01 COPY FROM (PNODE -
DSN=&FROMDSN -
DISP=(OLD,DELETE)) -
COMPRESS -
TO (SNODE DSN=&TODSN)
|
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.
Thanks
James |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10900 Location: italy
|
|
|
|
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
let me know and I will explain how to do it
| Code: |
/*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Trace "O"
Parse Source _sys _how _cmd .
say left(_cmd,8)"- Started"
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
say left(_cmd,8)"- Ended"
Exit 0
/* */
$tsoex:
tso_0tr = trace("O")
Address TSO arg(1)
tso_0rc = rc
trace value(tso_0tr)
return tso_0rc
/* */
$ispex:
isp_tr = trace("O")
Address ISPEXEC arg(1)
isp_rc = rc
trace value(isp_tr)
return isp_rc
/* */
$isred:
isr_tr = trace("O")
Address ISREDIT arg(1)
isr_rc = rc
trace value(isr_tr)
return isr_rc
|
the three skels
the header
| Code: |
LTSTRANS PROC PNODE=&FRNODE -
SNODE=&TONODE -
SNODEID=(&TOUSER,&TOPASS)
|
the detail ( used for each dataset )
| Code: |
&STEPNM COPY FROM(PNODE -
DSN=&FRDSNM -
DISP=(OLD,DELETE)) -
COMPRESS
TO(SNODE -
DSN=&TODSNM )
|
the trailer ( just for completeness, might not be needed )
the command used
| Code: |
| zmf01 enrico.ispf local remote user pass |
the result
| Code: |
LTSTRANS PROC PNODE=local -
SNODE=remote -
SNODEID=(user,pass)
STEP001 COPY FROM(PNODE -
DSN=ENRICO.ISPF.DITPROF -
DISP=(OLD,DELETE)) -
COMPRESS
TO(SNODE -
DSN=OUTPUT.ENRICO.ISPF.DITPROF )
STEP002 COPY FROM(PNODE -
DSN=ENRICO.ISPF.EXEC -
DISP=(OLD,DELETE)) -
COMPRESS
TO(SNODE -
DSN=OUTPUT.ENRICO.ISPF.EXEC )
STEP003 COPY FROM(PNODE -
DSN=ENRICO.ISPF.JCL -
DISP=(OLD,DELETE)) -
COMPRESS
TO(SNODE -
DSN=OUTPUT.ENRICO.ISPF.JCL )
STEP004 COPY FROM(PNODE -
DSN=ENRICO.ISPF.LOAD -
DISP=(OLD,DELETE)) -
COMPRESS
TO(SNODE -
DSN=OUTPUT.ENRICO.ISPF.LOAD )
STEP005 COPY FROM(PNODE -
DSN=ENRICO.ISPF.MSGS -
DISP=(OLD,DELETE)) -
COMPRESS
TO(SNODE -
DSN=OUTPUT.ENRICO.ISPF.MSGS )
STEP006 COPY FROM(PNODE -
DSN=ENRICO.ISPF.OBJ -
DISP=(OLD,DELETE)) -
COMPRESS
TO(SNODE -
DSN=OUTPUT.ENRICO.ISPF.OBJ )
STEP007 COPY FROM(PNODE -
DSN=ENRICO.ISPF.PANELS -
DISP=(OLD,DELETE)) -
COMPRESS
TO(SNODE -
DSN=OUTPUT.ENRICO.ISPF.PANELS )
STEP008 COPY FROM(PNODE -
DSN=ENRICO.ISPF.PARMS -
DISP=(OLD,DELETE)) -
COMPRESS
TO(SNODE -
DSN=OUTPUT.ENRICO.ISPF.PARMS )
STEP009 COPY FROM(PNODE -
DSN=ENRICO.ISPF.PROFILE -
DISP=(OLD,DELETE)) -
COMPRESS
TO(SNODE -
DSN=OUTPUT.ENRICO.ISPF.PROFILE )
STEP010 COPY FROM(PNODE -
DSN=ENRICO.ISPF.SKELS -
DISP=(OLD,DELETE)) -
COMPRESS
TO(SNODE -
DSN=OUTPUT.ENRICO.ISPF.SKELS )
STEP011 COPY FROM(PNODE -
DSN=ENRICO.ISPF.SRC -
DISP=(OLD,DELETE)) -
COMPRESS
TO(SNODE -
DSN=OUTPUT.ENRICO.ISPF.SRC )
STEP012 COPY FROM(PNODE -
DSN=ENRICO.ISPF.TABLES -
DISP=(OLD,DELETE)) -
COMPRESS
TO(SNODE -
DSN=OUTPUT.ENRICO.ISPF.TABLES )
/*
|
|
|
| Back to top |
|
 |
haleyja
New User
Joined: 09 Mar 2006 Posts: 15
|
|
|
|
Thanks Enrico.
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.
I'll be back.  |
|
| Back to top |
|
 |
haleyja
New User
Joined: 09 Mar 2006 Posts: 15
|
|
|
|
Thanks got it working. with some minor detours.  |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|