Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to call this rexx module in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
lokeshwar_manoharan

New User


Joined: 22 Sep 2008
Posts: 49
Location: Chennai,Tamilnadu

PostPosted: Fri Sep 26, 2008 4:58 pm    Post subject: How to call this rexx module in JCL
Reply with quote

Hi ,

I have a requirement in Rexx

I need to convert MAP cd x(3) (COMP-3 variable)

Eg ' ' should be converted to '....................'(20 characters)

I can be able to do this in rexx. But my requirement is to call this in JCL.

How to call this rexx module in JCL???

For eg if input file has 133333333 1 ' '
output file should be 133333333 1 '....................'.

I tried (11,3,ZD) But resulted in 133333333 1 '404040'.

Any solution to this..???
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Sep 26, 2008 5:04 pm    Post subject:
Reply with quote

Welcome to the forums. Please learn to post your request in the correct forum.

Also, the topic of running a REXX program in batch has been discussed many times and lots of examples on how to are included.

There is a search button at the top of almost every page. Please search the forums before posting.
Back to top
View user's profile Send private message
lokeshwar_manoharan

New User


Joined: 22 Sep 2008
Posts: 49
Location: Chennai,Tamilnadu

PostPosted: Fri Sep 26, 2008 6:12 pm    Post subject:
Reply with quote

Thanks expat


In rexx

X2B(04000) is yielding 00000100000000000000
and

X2B(04400) 00000100010000000000

and I am
getting correct result


How can we accomplish in JCL?

I tried this. But I got only spaces in output file

if first five positions in input had '04000'

OUTREC FIELDS=(1,5,ZD,TO=BI,LENGTH=20)

Ø (Normal mode)
00000000000000000038
00000000000000000180(Hex mode).

Am I making mistake? Please help me out.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Sep 27, 2008 3:20 am    Post subject:
Reply with quote

Hello,

It appears that you want to convert "nibbles" into their corresponding 1/0's. Is this true?

Your input is not ZD (zoned decimal), so that specification will not work.

Do you have 2 things you want to do? How does the X2B information relate to the original question?
Back to top
View user's profile Send private message
lokeshwar_manoharan

New User


Joined: 22 Sep 2008
Posts: 49
Location: Chennai,Tamilnadu

PostPosted: Sat Sep 27, 2008 12:42 pm    Post subject:
Reply with quote

Hi dick,


Yes XTOB converts every Hexadecimal character into 4 binary BITS,

eg X2B(04000) yields 0000 0100 0000 0000

But I don't know how to accomplish this is JCL

My input has hexa decimal map code in the format X(3).

I can be able to convert into

(1,3,PD,M11) to yield results like 04000,
04400
08000

etc

Still I need this to convert to X(20) Bitmap


04000 to '0000 0100 0000 0000' or '.... .1.. .... ....'

04400 to '0000 0100 0100 0000' or '.... .1.. .1.. ....'

etc

Is it possible in JCL to do this ?

Thanks,
M.Lokeshwar
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Sat Sep 27, 2008 2:36 pm    Post subject:
Reply with quote

Yes, you can run your REXX code in batch using IKJEFT01.

Or is your problem in the REXX code that you do not get the results that you want, or both ?

Not sure why you are using SORT statements in REXX to accomplich what the REXX is already doing.
Back to top
View user's profile Send private message
lokeshwar_manoharan

New User


Joined: 22 Sep 2008
Posts: 49
Location: Chennai,Tamilnadu

PostPosted: Sat Sep 27, 2008 3:42 pm    Post subject:
Reply with quote

I am very new to REXX. I haven't run REXX in batch jobs.

Can u please tell me whether we need a dataset to run REXX in batch job?

Say my input has SSN Suffix + Bitmap(Hexa decimal)

and I have REXX code that converts Bitmap alone to 20 Bits.

Now can u please tell me how to pass the parameter(Bitmap) to REXX and get back the result.

I got the JCL below by searching. Is this the way to pass parameter to REXX?

Then how its possile to pass Bitmap alone(without SSN and suffix ) and get back the result?


//STEPNAME EXEC PGM=IKJEFT01,PARM='exec_member_name argument'
//SYSPRINT DD SYSOUT=A
//SYSEXEC DD DSN=exec_data_set_name,DISP=SHR
//SYSTSPRT DD DSN=output_data_set_name,DISP=SHR
//SYSTSIN DD DUMMY

Thanks,
Lokesh
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Sat Sep 27, 2008 4:28 pm    Post subject:
Reply with quote

The JCL that you have shown is fine.

Within the REXX you will need

PARSE ARG whatever .

which reads your parm value (argument) into the variable whatever and can then be processed by the REXX code.

The result is within the REXX exec and if you want to write it out to a dataset then use EXECIO to write it out to the chosen DDname which you need to include in your JCL, unless you have allocated it dynamically from within the REXX.

And - well done, you have researched the REXX batch JCL for yourself after being given a clue.
Back to top
View user's profile Send private message
lokeshwar_manoharan

New User


Joined: 22 Sep 2008
Posts: 49
Location: Chennai,Tamilnadu

PostPosted: Sat Sep 27, 2008 7:15 pm    Post subject:
Reply with quote

Thanks,

Tell me one thing.

My file has lot of records with Bitmaps.

So when each record is processed, REXX command should be executed in JCL.

Here I think only one parameter can be passed..?

Why I decided to go for JCL because, we can submit the job and we can do other things.

But its not possible in the case of rexx.. It will be restricting us from doing other things till its completed.

Or else in rexx itself I ll read the input convert the bitmap and write to output file.

I don't know how much time it ll take for more records.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Sat Sep 27, 2008 8:51 pm    Post subject:
Reply with quote

You can read as many records as you want from a dataset and do numerous processes for each record, just like any other program can do.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us