IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Difference when accessing dataset in view and browse mode


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
leoben

New User


Joined: 21 Mar 2023
Posts: 4
Location: United Kingdom

PostPosted: Tue Mar 21, 2023 3:47 pm
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1329
Location: Bamberg, Germany

PostPosted: Tue Mar 21, 2023 3:59 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Tue Mar 21, 2023 4:10 pm
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1329
Location: Bamberg, Germany

PostPosted: Tue Mar 21, 2023 5:03 pm
Reply with quote

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
View user's profile Send private message
leoben

New User


Joined: 21 Mar 2023
Posts: 4
Location: United Kingdom

PostPosted: Tue Mar 21, 2023 5:24 pm
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1329
Location: Bamberg, Germany

PostPosted: Tue Mar 21, 2023 5:56 pm
Reply with quote

You can try to allocate DD:IN in the JCL as a quick solution.
Back to top
View user's profile Send private message
leoben

New User


Joined: 21 Mar 2023
Posts: 4
Location: United Kingdom

PostPosted: Tue Mar 21, 2023 8:04 pm
Reply with quote

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. icon_cool.gif
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2127
Location: USA

PostPosted: Tue Mar 21, 2023 9:21 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Difference between joblib and steplib JCL & VSAM 2
No new posts batch SFTP job using AOPBATCH unable ... All Other Mainframe Topics 7
No new posts Pull data using date difference betwe... DB2 6
No new posts Reading Empty Dataset DFSORT/ICETOOL 5
No new posts Difference between PLT txn and schedu... CICS 3
Search our Forums:

Back to Top