Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Display in lowercase in dynamic JCL
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Sumeendar

New User


Joined: 31 Jan 2006
Posts: 37

PostPosted: Mon Jul 06, 2015 12:44 pm    Post subject: Display in lowercase in dynamic JCL
Reply with quote

I am creating a dynamic JCL through a Rexx program.

In one of SYSIN Steps of the dynamic JCL i need to pass few values in lower case letters.

i gave it as below.
Code:

SELECT                               
  WHEN region  = 'TEST'   THEN DO     
       [b]regn    [/b]= 't'                 
  END
END


Code:
upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 
lower = 'abcdefghijklmnopqrstuvwxyz' 

[b]regn1[/b] = translate([b]regn[/b], lower, upper)       

QUEUE '//JVEDTSAR EXEC '||procver||'                         
QUEUE '//    SUBMINP='''||in_dsn||'('||membr||')'',         
QUEUE '//S120.SYSIN  DD DSN='||cclib||'(CP95115C),DISP=SHR   
QUEUE '//S130.STDENV  *                                     
QUEUE 'Region='||[b]regn1[/b]||'   


but when JCL got created it is displaying value of regn1 field in 'T', instead of 't'

let me know how i print in lowe case

Appreciate your support

Code'd
Back to top
View user's profile Send private message

Smita.t2

New User


Joined: 17 Apr 2012
Posts: 22
Location: Bangalore

PostPosted: Mon Jul 06, 2015 12:50 pm    Post subject:
Reply with quote

Try ISPF edit macro Caps off.

Code:
ADDRESS ISREDIT "CAPS OFF"
Back to top
View user's profile Send private message
Sumeendar

New User


Joined: 31 Jan 2006
Posts: 37

PostPosted: Mon Jul 06, 2015 1:04 pm    Post subject: Reply to: Display in lowercase in dynamic JCL
Reply with quote

Thank s for the tip. but it didn't work,

Acutally i am creating a jcl and writing to a PS file which is being allocated by Rexx.

This is how i am allocating the file (OUTFILE)

Code:
IF sysreason = 0 THEN DO                                     
   "DELETE '"schd_dsn"'"                                     
END                                                         
   "ALLOC FI(OUTFILE) NEW SP(1 1) TR DSORG(PS) RECFM(F B)   
       LRECL(80)  DSN('"schd_dsn"')"   



i am wring the dynamic JCl to file (OUTFILE) as below

Code:
maxbuf = QUEUED()                         
DO indx = 1 TO maxbuf BY 1               
   PULL record                           
   IF record  > ''                    THEN
      QUEUE record   /* only want records
END                                       
QUEUE ''                                 
"EXECIO * DISKW OUTFILE"   


is it possible to set CAPS OFF when the OUTFILE file is being created
Back to top
View user's profile Send private message
Smita.t2

New User


Joined: 17 Apr 2012
Posts: 22
Location: Bangalore

PostPosted: Mon Jul 06, 2015 1:29 pm    Post subject:
Reply with quote

After dataset allocation, code something like this
Code:
ADDRESS ISPEXEC 'EDIT DATASET('DSNNAME') MACRO(CAPS OFF)'
Back to top
View user's profile Send private message
Sumeendar

New User


Joined: 31 Jan 2006
Posts: 37

PostPosted: Mon Jul 06, 2015 2:58 pm    Post subject: Reply to: Display in lowercase in dynamic JCL
Reply with quote

i gave as below after allocating to dsnname

schd_dsn = user||'.T.CSP.Q.'||membr

ADDRESS ISPEXEC 'EDIT DATASET('"schd_dsn"') MACRO(CAPS OFF)' after created

but when i open the JCL inside schd_dsn, it is still shown REGION=T, which needs to be shown as REGION=t

//S130.STDENV *
REGION=T
Back to top
View user's profile Send private message
Sumeendar

New User


Joined: 31 Jan 2006
Posts: 37

PostPosted: Mon Jul 06, 2015 3:14 pm    Post subject: Reply to: Display in lowercase in dynamic JCL
Reply with quote

Also when i open the dataset in view mode and give PROF it says CAPS ON.
CAPS OFF yet to activate
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7240

PostPosted: Mon Jul 06, 2015 4:37 pm    Post subject: Reply to: Display in lowercase in dynamic JCL
Reply with quote

Why, if you have set the value to a lower-case "t", do you attempt to translate it from uppercase?

Are you aware of what PULL is equivalent to in terms of PARSE?

Do you know how to use Trace?

The code you've shown won't give you REGION= once you've corrected it for the "t".
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1717
Location: UK

PostPosted: Mon Jul 06, 2015 9:55 pm    Post subject:
Reply with quote

Sumeendar

Please use the code tags when posting code and data. You want help so make it as easy as possible for others to help. By using the code tags we can read your code better.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Tue Jul 07, 2015 1:41 am    Post subject: Reply to: Display in lowercase in dynamic JCL
Reply with quote

Bill gave you this hint:
Quote:
Are you aware of what PULL is equivalent to in terms of PARSE?

You should have read the Rexx Reference manual by now. If you have not yet read the section about PULL already, please do so now.
Back to top
View user's profile Send private message
Sumeendar

New User


Joined: 31 Jan 2006
Posts: 37

PostPosted: Tue Jul 07, 2015 10:55 am    Post subject: Reply to: Display in lowercase in dynamic JCL
Reply with quote

I will sum up my orignrial requirement

The JCL i am preparing thru Rexx requires few chracters to be shown in lower case letteres (eg. regn value 't' in below code),

Code:
SELECT                               
  WHEN region  = 'TEST'   THEN DO   
       regn    = 't'             


The regn value will be set in dynamic JCL as below

Code:
QUEUE '//JVEDTSAR EXEC '||procver||'                                   
QUEUE '//        SUBMINP='''||in_dsn||'('||membr||')'',                 
QUEUE '//         S5PARM='''||comp||accmo||accyr||'  'LEFT(membr,16,' ')
QUEUE '//S120.SYSIN  DD DSN='||cclib||'(CP95115C),DISP=SHR             
QUEUE '//S130.STDENV  *                                                 
QUEUE 'Region='||regn||'   


When i put TRACE option, lower case is correctly shown, like Region=t, which is what required.

Code:
*-*  QUEUE '//JVEDTSAR EXEC '||procver||'                               
>>>    "//JVEDTSAR EXEC CPT11103                                         
*-*  QUEUE '//        SUBMINP='''||in_dsn||'('||membr||')'',             
>>>    "//        SUBMINP='I90113.D54DC.CSPI.COMP.DATA(C701OSL2)',       
*-*  QUEUE '//         S5PARM='''||comp||accmo||accyr||'  'LEFT(membr,16,
>>>    "//         S5PARM='00810612  C701OSL2        01',"               
*-*  QUEUE '//S120.SYSIN  DD DSN='||cclib||'(CP95115C),DISP=SHR         
>>>    "//S120.SYSIN  DD DSN=TEST.CONTROL(CP95115C),DISP=SHR             
*-*  QUEUE '//S130.STDENV  *                                             
>>>    "//S130.STDENV  *                                                 
*-*  QUEUE 'Region='||regn||'                                           
>>>    "Region=t           


After writing to a Dataset which is allocated thru Rexx, and when we open the dataset it showing as REGION=T

I believe when the dataset is allocated CAPS ON is in place. Is there any way to overide with CAPS OFF

As per earlier not i have put below statement after the data set is apllocated, but it didn't work

ADDRESS ISPEXEC 'EDIT DATASET('DSNNAME') MACRO(CAPS OFF)'

I gone through internet, but didn't get a solution

Appreciate yoy whole some support. I hope the information provided helps to give a solution

Thanks
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Jul 07, 2015 11:59 am    Post subject: Reply to: Display in lowercase in dynamic JCL
Reply with quote

it works for me ...
Code:

 EDIT       ENRICO.ISPF.EXEC(ZQ) - 01.04                    Columns 00001 00072
 Command ===>                                                  Scroll ===> CSR
 ****** ***************************** Top of Data ******************************
 000001 /*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 000002 /*                                                                   */
 000003 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 000004 Trace "O"
 000005
 000006 lower = "lower"
 000007 upper = "UPPER"
 000008
 000009 queue lower
 000010 queue upper
 000011 queue ""
 000012
 000013 Address TSO "ALLOC FI(OUT) DS(ENRICO.MFTESTS.PS) SHR REUSE"
 000014
 000015 Address TSO "EXECIO * DISKW OUT (FINIS"
 000016
 000017 Address TSO "FREE  FI(OUT) "
 000018
 000019 Exit 0
 000020
 ****** **************************** Bottom of Data ****************************


Code:

 EDIT       ENRICO.MFTESTS.PS                               Columns 00001 00072
 Command ===>                                                  Scroll ===> CSR
 ****** ***************************** Top of Data ******************************
 ==MSG> -CAUTION- Profile changed to CAPS OFF (from CAPS ON) because data
 ==MSG>           contains lower case characters.
 000001 lower
 000002 UPPER
 ****** **************************** Bottom of Data ****************************
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7240

PostPosted: Tue Jul 07, 2015 12:03 pm    Post subject: Reply to: Display in lowercase in dynamic JCL
Reply with quote

We know what your requirement is as it relates to the "t". We don't know why you are doing various things you are doing (like trying to convert it from uppercase to lowercase) but we know why your "t" has become a "T".

Forget the CAPS stuff for this. It is a Red Herring.

Quote:
PULL
Code:

PULL               ;
     template_list


PULL reads a string from the head of the external data queue. It is just a short
form of the instruction:

Code:
PARSE UPPER PULL               ;
                 template_list


That is the bit from the manual which Pedro suggested you locate.

When you use PULL it is exactly the same as if you code PARSE UPPER PULL. Guess what the UPPER does? I suggest you follow Pedro's suggestion and read the manual.

If you are only going to look at the Trace output as far as you feel like, what was the point? You need to look at it until the data "goes bad", not until it passes the code that you "know" is wrong with everything (except perhaps the Region=, that is now unclear what is OK for you) OK.
Back to top
View user's profile Send private message
Sumeendar

New User


Joined: 31 Jan 2006
Posts: 37

PostPosted: Tue Jul 07, 2015 3:16 pm    Post subject: Reply to: Display in lowercase in dynamic JCL
Reply with quote

The example which enrico posted worked for me too

however when i tried with another small example it didn't give the expected result

sample example

Code:
/*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*                                                                   */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Trace "O"
 
ADDRESS TSO
 
 
  queue '//JVEDTSAR EXEC CPT11103                                                         '
  queue '//S130.STDENV  *                                                                 '
  queue 'Region=t                                                                         '
 
  "ALLOC FI(OUTFILE) NEW SP(1 1) TR DSORG(PS) RECFM(F B)
         LRECL(80)  DSN('I90113.TEST.NEW1')"
 
  maxbuf = queued()
  DO indx = 1 TO maxbuf BY 1
     PULL record
     IF record  > ''                    THEN
        queue record   /* only want records other than null or spaces    */
  END
  queue ""
  "EXECIO * DISKW OUTFILE (FINIS"
  "FREE  FI(OUTFILE) "
 
Exit 0


contents in dataset I90113.TEST.NEW1

Code:
  File  Edit  Edit_Settings  Menu  Utilities  Compilers  Test  Help
--------------------------------------------------------------------
ISOE       I90113.TEST.NEW1                                Columns 0
Command ===>                                                  Scroll
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6-
****** ***************************** Top of Data *******************
==MSG> -Warning- The UNDO command is not available until you change
==MSG>           your edit profile using the command RECOVERY ON.   
000001 //JVEDTSAR EXEC CPT11103                                     
000002 //S130.STDENV  *                                             
000003 REGION=T           


Since i am novice in Rexx, is it anything related to writing from Queue

Appreciate the support
Back to top
View user's profile Send private message
Sumeendar

New User


Joined: 31 Jan 2006
Posts: 37

PostPosted: Tue Jul 07, 2015 3:19 pm    Post subject: Reply to: Display in lowercase in dynamic JCL
Reply with quote

Region=t, mentiond in the queue, got changed to REGION=T, when displayed in the dataset
Back to top
View user's profile Send private message
Sumeendar

New User


Joined: 31 Jan 2006
Posts: 37

PostPosted: Tue Jul 07, 2015 3:37 pm    Post subject: Reply to: Display in lowercase in dynamic JCL
Reply with quote

Referring on PARSE option in net, i gave it as below, but it threw syntax error oin PARSE Statement

Code:
maxbuf = queued()                                                   
DO indx = 1 TO maxbuf BY 1                                           
   PARSE CASELESS PULL record                                       
   IF record  > ''                    THEN                           
      queue record   /* only want records other than null or spaces 
END               
Back to top
View user's profile Send private message
Sumeendar

New User


Joined: 31 Jan 2006
Posts: 37

PostPosted: Tue Jul 07, 2015 3:43 pm    Post subject: Reply to: Display in lowercase in dynamic JCL
Reply with quote

it worked finally
removed CASELESS and just gave as below

Code:
PARSE PULL record   


Thank you all for your adequate support
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Jul 07, 2015 3:56 pm    Post subject: Reply to: Display in lowercase in dynamic JCL
Reply with quote

any reason to go thru the queue/pull shit, when You just re-process the data You just queued ?

since You do the queue, just queue only the things You need !
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 990
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Jul 07, 2015 6:49 pm    Post subject:
Reply with quote

Why did you specify CASELESS? This parameter is for Object Rexx only.

See what happens if you just code PARSE PULL.

Garry.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1219
Location: Israel

PostPosted: Tue Jul 07, 2015 7:46 pm    Post subject:
Reply with quote

Expect some problems with this part too:
Sumeendar wrote:
Code:
queue '//S130.STDENV  *                                                                 '

It is missing something...

And I'd like to see the answer to this question:
enrico-sorichetti wrote:
any reason to go thru the queue/pull shit, when You just re-process the data You just queued ?
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 331
Location: USA

PostPosted: Tue Jul 07, 2015 9:08 pm    Post subject: Reply to: Display in lowercase in dynamic JCL
Reply with quote

Quote:
As per earlier not i have put below statement after the data set is apllocated, but it didn't work

ADDRESS ISPEXEC 'EDIT DATASET('DSNNAME') MACRO(CAPS OFF)'

I gone through internet, but didn't get a solution


On the internet, I found the possible reason why you could not get to a caps off profile.

Presumably, 'CAPS OFF' Macro didn't work because you are limited to only one word macro name. And since 'CAPS OFF' are 2 words, it didn't work.

You need to try this:
var1='OFF'
"EDIT DATASET('DSNNAME') MACRO(CAPS) PARM(VAR1)"

and see if it works for you this way
.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm
This topic is locked: you cannot edit posts or make replies. DSList (3.4) cannot display Chinese c... jacobdng TSO/ISPF 4 Wed Oct 05, 2016 2:51 pm
This topic is locked: you cannot edit posts or make replies. Get and display content of an address... lind sh CICS 1 Mon Aug 08, 2016 9:18 am
No new posts Creating a dynamic sort card in JCL u... ChitraChhabra DFSORT/ICETOOL 4 Wed Aug 03, 2016 6:15 pm
No new posts Need help on SQL Dynamic WHERE Clause subratarec DB2 12 Sat Jul 16, 2016 3:11 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us