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

how to import SAS file from server unix


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

New User


Joined: 10 Sep 2007
Posts: 18
Location: Italy

PostPosted: Thu Apr 03, 2008 8:47 pm
Reply with quote

Hi this is the job that I used
The file FILE.SAS is created BUT don't work correctly in Sas icon_cry.gif

//DELE0001 EXEC PGM=IEFBR14,COND=(0,NE)
//DD1 DD DSN=FILE.SAS,DISP=(MOD,DELETE),
// SPACE=(TRK,2)
//*
//ALLO0002 EXEC PGM=IEFBR14,COND=(0,NE)
//DD1 DD DSN=FILE.SAS,DISP=(,CATLG,DELETE),
// DCB=(DSORG=PS,RECFM=FS,LRECL=6144,BLKSIZE=6144),
// SPACE=(CYL,(20,20),RLSE)
//*=================================================================
//*=================================================================
//SRSFTP1 EXEC PGM=FTP,REGION=3M,PARM='(EXIT '
//SYSPRINT DD SYSOUT=*
//SYSTCPD DD DSN=SYS1.TCPIP.PARMLIB(xxxxxxx),DISP=SHR
//SYSFTPD DD DSN=SYS1.TCPIP.PARMLIB(yyyyyyy),DISP=SHR
//SYSMDUMP DD SYSOUT=*
//FILEIN DD DISP=SHR,DSN=FILE.SAS
//OUTPUT DD SYSOUT=*
//INPUT DD *
xxxxxXFTP.xxx.xxxxxxxx.xxxNET.xx
user password
CD A0xxxxxxx
BIN
GET xxxx.SAS7BDAT '//DD:FILEIN' (REPLACE
QUIT
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Thu Apr 03, 2008 8:57 pm
Reply with quote

Is 'FILE.SAS' empty file? what is the file content of 'FILE.SAS'?

Any reason as why you are using BIN
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Apr 03, 2008 9:00 pm
Reply with quote

When exchanging data between different platform very seldom a BINARY transfer yields the wanted results icon_sad.gif

there are issues with ascii/ebcdic big_endian/little_endian

the best thing is to create a text file , upload it to the mainframe translating from ASCII to EBCDIC and use that to rebuild the data

unless, but I am not a SAS expert, SAS provides tools for such tasks
Back to top
View user's profile Send private message
imagines

New User


Joined: 10 Sep 2007
Posts: 18
Location: Italy

PostPosted: Thu Apr 03, 2008 9:02 pm
Reply with quote

Devzee wrote:

Is 'FILE.SAS' empty file? what is the file content of 'FILE.SAS'?

Any reason as why you are using BIN


Devzee wrote:

what is the file content of 'FILE.SAS'?
BIN


PROBABLY THIs is the mistake i Tranfer file from Unix directly into FILE.SAS

Devzee wrote:

why you are using BIN

icon_rolleyes.gif
is correct ASCII ?
Back to top
View user's profile Send private message
imagines

New User


Joined: 10 Sep 2007
Posts: 18
Location: Italy

PostPosted: Thu Apr 03, 2008 9:16 pm
Reply with quote

File on server xxxx.SAS7BDAT is a sas table and is in BIN format
Back to top
View user's profile Send private message
imagines

New User


Joined: 10 Sep 2007
Posts: 18
Location: Italy

PostPosted: Thu Apr 03, 2008 9:21 pm
Reply with quote

This is a correct File
BROWSE Line 00000000 Col 001 080
Command ===> Scroll ===> CSR
********************************* Top of Data **********************************


------------------------------------------------------------------------------
#SASLAAS........................USER001 .!.!.p'd8.0101M0........USER001 .!E.....
7ECEDCCE000000000000000100000000CCFFFFF445357978F4FFFFDF00000010CCFFFFF445C02C03
B2123112100000000003000000000000550672208A2A47D48B01014000030080550672208A599E95
------------------------------------------------------------------------------
REGSTRY ................................ITEMSTOR........
DCCEEDE444444444444444444444444400000000000000000000000000000000CECDEEDD00000000
95723980000000000000000000000000000000000000000000000000000000009354236900000000
------------------------------------------------------------------------------
.........n.H....................................................................
00000000295C00000000000000000000000000000000000000000000000000000000000000000000
00000000552800010003000000000000000000000000000000000000000000000000000000000000
------------------------------------------------------------------------------
.C..............................................................................
2C650000000000000000000000000000000000000000000000000000000000000000000000000000
C3590001000000000000000000000000000000000000000000000000000000000000000000000000

THIS IS mi FILE.SAS after transfer

BROWSE Line 00000000 Col 001 080
Command ===> Scroll ===> CSR
********************************* Top of Data *********************************


------------------------------------------------------------------------------
............B.a-.....k...G.....................................................
000000000000CE86B11CB9000C38111122032003000000000000111122032003030220300100000
0000000000002A10341FD280971C8F01220221224000000000318F0122022122421220E00031000
------------------------------------------------------------------------------
..........................................O.......O........ ....... ...........
222222222222222222222222222244542222A1617AD4A1617AD4000002A4000002A400000200000
000000000000000000000000000041410000CC2B3061CC2B3061000000C0000000C004000000300
------------------------------------------------------------------------------
....................................\..=\..=\..=...................O..........O
00000000000000000000000000000000A161E507E507E5070000000000000000A8BD0000A1617AD
00000000000000000000000000000000CC2B02DE02DE02DE0000000000000000A0660000CC2B306
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Apr 03, 2008 9:34 pm
Reply with quote

Please use "HEX ON VERT" and use the code tags

sample

Code:

------------------------------------------------------------------------------
ABCDEFGHIJabcdefghij1234567890
CCCCCCCCCD8888888889FFFFFFFFFF0000000100020003
123456789112345678911234567890000C000C000C000C
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 Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
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