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

Writing file output command - Pls Help


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
janaonline

New User


Joined: 13 Dec 2007
Posts: 11
Location: USA, California

PostPosted: Sat Oct 09, 2010 4:25 am
Reply with quote

Hi,

In my program, am using the the dataset for multiple entries. So the dataset is in 'MOD' 'REUSE'. The write format is not what i was expecting.
Please find the code below.

"ALLOC F(OUTDD1) NEW DSORG(PS) REC(F B) LR(80) BLK(27920)",
"SPACE(10,10) TRACKS DSNAME('"OUTDS"')"
"ALLOC F(OUTDD1) DA('"OUTDS"') MOD REUSE" ;
PUSH IN_DT
"EXECIO" 1 "DISKW OUTDD1"
"EXECIO" 0 "DISKW OUTDD1 (FINIS"
"FREE F(OUTDD1)"

IN_DT = UID' 'EXHH' 'EHH' 'EXPCN' 'EPCN' 'EXTMSTP' 'ETMSTP

The output of the above code will be like this.

USR001 11111 2222 3333 4444 55555 66666
USR002 11111 2222 3333 4444 55555 66666
USR003 11111 2222 3333 4444 55555 66666

But i want the program to write the record in different format. The sample format is shown below.
USR001
11111
2222
3333
4444
55555
66666
USR002
11111
2222
3333
4444
55555
66666

Please help me in solving this. Thanks for your time.

[/img]
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Sat Oct 09, 2010 5:31 am
Reply with quote

I'm not following what difference it makes how your output dataset is allocated. You need to initiate multiple writes, i.e.:

PUSH UID
"EXECIO 1 DISKW OUTDD1"
PUSH EXHH
"EXECIO 1 DISKW OUTDD1"
PUSH EHH
"EXECIO 1 DISKW OUTDD1"
PUSH EXPCN
"EXECIO 1 DISKW OUTDD1"
PUSH EPCN
"EXECIO 1 DISKW OUTDD1"
PUSH EXTMSTP
"EXECIO 1 DISKW OUTDD1"
PUSH ETMSTP
"EXECIO 1 DISKW OUTDD1"
...

or

QUEUE UID
QUEUE EXHH
QUEUE EHH
QUEUE EXPCN
QUEUE EPCN
QUEUE EXTMSTP
QUEUE ETMSTP
"EXECIO " QUEUED()" DISKW OUTDD1"
...
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sat Oct 09, 2010 12:46 pm
Reply with quote

the output is consistent with Your coding

You queued a record built by string juxtaposition

if You want things in seperate records build each record accordingly
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Sat Oct 09, 2010 9:39 pm
Reply with quote

Quote:
build each record accordingly

Each time you PUSH builds a new record.
Back to top
View user's profile Send private message
janaonline

New User


Joined: 13 Dec 2007
Posts: 11
Location: USA, California

PostPosted: Sat Oct 23, 2010 12:29 am
Reply with quote

Thanks for all your guidance. I solved the issue by multiple writes..
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top