JUNK CHARACTERS PRINTED WHEN USING LMCOPY FUNCTION IN REXX



IBM's Command List programming language & Restructured Extended Executor

JUNK CHARACTERS PRINTED WHEN USING LMCOPY FUNCTION IN REXX

Postby srn123 » Thu Sep 10, 2009 4:56 pm

Hi,

I am trying to copy a parm (sort card) from one of my PDS members to a newly created member in another PDS using LMCOPY. The new member name is given by the user through an ISPF panel.

Below is the part of code that I used for LMCOPY. 'PARM' is given by the user which is passed as an argument. SORT PARM contains the skeleton of SORT commands( as given below)

"LMINIT DATAID(INDD1) DATASET('A888748.REXX.NEW')"
"LMINIT DATAID(OUTDD1) DATASET('TEST.MJRS.PARMLIB')"
"LMCOPY FROMID("INDD1") TODATAID("OUTDD1") FROMMEM(SORTPARM)
TOMEM("PARM") PACK"

SORTPARM -
***************************** Top of Data ******************************
SORT FIELDS=(1,8,CH,A)
SUM FIELDS=NONE
**************************** Bottom of Data ****************************

Question -

The copy happens correctly to the member as given by the user. But when I try to use this parm in a sort step, I get an abend. I saw in the spool that there are a few junk characters present. This is what the spool says -

SYSIN :
F & nSORT FIELDS=(1,8,CH,A) SUM FIELDS=NONE
*
Junk characters are printed before the SORT FIELDS and also the sum fields come in the same line. How do I remove this junk characters? I did a 'HEX ON' to see if there are any junk characters printed in 'PARM' while trying to copy. But there aren't any. Neither are there any junk in SORTPARM.

Different trials done -
1. I tried to give the sort commands inline in the sort step itself and it ran fine.
2. I manually wrote a parm with the above sort commands and ran the sort step pointing to the parm, it ran fine.

So, I came to the conclusion that this junk (might be a carraige return symbol or so) must have been caused by the
LMCOPY when trying to copy to a new member.

Could you please let me know what the problem is and how to eliminate the junk characters?

Thanks!
srn123
 
Posts: 13
Joined: Wed Aug 26, 2009 6:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: JUNK CHARACTERS PRINTED WHEN USING LMCOPY FUNCTION IN REXX

Postby enrico-sorichetti » Thu Sep 10, 2009 7:28 pm

the wrong output is simply due to a misuse of the PACK keyword,
read about it in the manual

PACK is transparent to all that is done inside the ISPF environment ( edit/view/browse)
outside of it it looks like garbage
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: JUNK CHARACTERS PRINTED WHEN USING LMCOPY FUNCTION IN REXX

Postby srn123 » Thu Sep 10, 2009 7:58 pm

Thanks! it is working now.
I had one more question. Could you please tell me what PACK means. I mean why it is used for and why and when PACK OFF and PACK ON is used?
srn123
 
Posts: 13
Joined: Wed Aug 26, 2009 6:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: JUNK CHARACTERS PRINTED WHEN USING LMCOPY FUNCTION IN REXX

Postby expat » Fri Sep 11, 2009 4:17 pm

I had one more question. Could you please tell me what PACK means. I mean why it is used for and why and when PACK OFF and PACK ON is used?

I am sure that the manual offers a better explanation than we can give you :mrgreen:
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: JUNK CHARACTERS PRINTED WHEN USING LMCOPY FUNCTION IN REXX

Postby dick scherrer » Sat Sep 12, 2009 12:33 am

Hello,

Look at this page:
http://publibz.boulder.ibm.com/cgi-bin/ ... pzug70/5.9

It has been over 2 years and so far i have not managed to get links to the IBM manuals posted. . .

Sorry,

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post