View previous topic :: View next topic
|
Author |
Message |
leoben
New User
Joined: 21 Mar 2023 Posts: 4 Location: United Kingdom
|
|
|
|
Hi all,
Im currently using a REXX script to pull some information about user accounts. I execute the script using a batch job, as follow:
Code: |
//ABGRP JOB ABGRP,NOTIFY=&SYSUID,MSGCLASS=H,
// MSGLEVEL=(1,1)
//TSOCMD EXEC PGM=IKJEFT01
//SYSTSPRT DD DSN=HLQ.OUTPUT,DISP=SHR
//SYSTSIN DD *
EXEC 'HLQ.USRENUM.(USR)'
/*
|
I then pull the dataset off the mainframe using ftp and do some other processing on it. However, when viewing the ftp'd file I notice that the number "1" has been appended to every 56-ish line, and a space has been added to the start of all other lines. When I open the dataset in browse mode, I do not see any of this. Opening it in view mode however shows these additions.
I assume this would be to do with how the output is being written to the dataset. I have tried googling around to see if there is some "block" output setting that is causing this, or if there is a way to remove the "1" and spaces that are added. Any help would be greatly appreciated. I have included a sample of the file when opened in browse vs view mode.
Browse:
Code: |
********************************* Top
READY
EXEC 'HQL.USRENUM(USR)'
CLASS:USR
RACFID:USERA
INSTDATA:INFO GOES HERE
OWNER:USERB
{...SNIPPED...} |
View:
Code: |
********************************* Top
1READY
EXEC 'HQL.USRENUM(USR)'
CLASS:USR
RACFID:USERA
INSTDATA:INFO GOES HERE
OWNER:USERB
{...SNIPPED...} |
|
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1334 Location: Bamberg, Germany
|
|
|
|
Try this instead of IKJEFT01
Code: |
//IRXJCL EXEC PGM=IRXJCL,PARM='USR'
//SYSEXEC DD DISP=SHR,DSN=HLQ.USRENUM
//SYSTSPRT DD SYSOUT=* <* FBA;133
//SYSTSIN DD DUMMY |
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
the dateset you are browsing is a sysout dataset with asa printer control chararcters in position 1 of each record
the 1 is a skip to new page and print
the " " is a advance one line and print
if, when browsing , you give the command DISPLAY CC
the ones and the spaces in column 1 will show
to process the dataset JUST for data just start from position 2 |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1334 Location: Bamberg, Germany
|
|
|
|
What Enrico has written is valid. However the behavior of IKJEFT01 and IRXJCL is different regarding ASA chars, that's why I have recommended that solution. Let us know if that suits your requirement. |
|
Back to top |
|
|
leoben
New User
Joined: 21 Mar 2023 Posts: 4 Location: United Kingdom
|
|
|
|
Hey Joerg,
So I've tried changing it to use IRXJCL. Im currently just running into an issue. As part of my REXX program im pulling a list of classes from another dataset. This is the relevant part:
Code: |
"ALLOC DATASET('HLQ.USRENUM(LIST)') FILE(IN) SHR"
"EXECIO * DISKR IN (FINIS STEM CLASSES."
|
when updating my JCL to:
Code: |
//ABGRP JOB ABGRP,NOTIFY=&SYSUID,MSGCLASS=H,
// MSGLEVEL=(1,1)
//TSOCMD EXEC PGM=IRXJCL,PARM='USR'
//SYSEXEC DD DISP=SHR,DSN=HLQ.USRENUM
//SYSTSPRT DD DSN=HLQ.OUTPUT,DISP=SHR
//SYSTSIN DD *
/* |
I get the following error:
Code: |
2 *-* "ALLOC DATASET('HLQ.USRENUM(LIST)') FILE(IN) SHR"
+++ RC(-3) +++
IRX0555E The input or output file IN is not allocated. It cannot be opened for I/O
IRX0670E EXECIO error while trying to GET or PUT a record. |
So im just trying to figure out why its failing. Im not sure if i would be able to define the IN file as part of the PARMs. Ive also read that when using IRXJCL the program will be run in the MSV environment instead of TSO, and im not sure if that would impact anything. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1334 Location: Bamberg, Germany
|
|
|
|
You can try to allocate DD:IN in the JCL as a quick solution. |
|
Back to top |
|
|
leoben
New User
Joined: 21 Mar 2023 Posts: 4 Location: United Kingdom
|
|
|
|
Hey Joerg,
Thanks for this! With some modifying I got the JCL to work and now I dont have any more of the printer control characters in my output. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2140 Location: USA
|
|
|
|
I guess you may force not to use the control character by specifying explicitly the parameter in your ALLOCATE in REXX code
Code: |
ALLOC . . . . RECFM(F,B) . . . . NEW |
|
|
Back to top |
|
|
|